mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-16 16:31:56 +00:00
delete debug log
This commit is contained in:
parent
0f42ce3b80
commit
cd172e371d
1
package-lock.json
generated
1
package-lock.json
generated
@ -6484,7 +6484,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz",
|
||||||
"integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==",
|
"integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"array-includes": "^3.1.8",
|
"array-includes": "^3.1.8",
|
||||||
"array.prototype.findlast": "^1.2.5",
|
"array.prototype.findlast": "^1.2.5",
|
||||||
|
|||||||
@ -309,12 +309,6 @@ const Chat = forwardRef<ChatRef, ChatProps>((props, ref) => {
|
|||||||
handleScrollToBottom()
|
handleScrollToBottom()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for debugging
|
|
||||||
setChatMessages((prevChatHistory) => {
|
|
||||||
const lastMessage = prevChatHistory[prevChatHistory.length - 1];
|
|
||||||
console.log("Last complete message:", lastMessage?.content);
|
|
||||||
return prevChatHistory;
|
|
||||||
});
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.name === 'AbortError') {
|
if (error.name === 'AbortError') {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -16,7 +16,6 @@ export default function OnEnterPlugin({
|
|||||||
const removeListener = editor.registerCommand(
|
const removeListener = editor.registerCommand(
|
||||||
KEY_ENTER_COMMAND,
|
KEY_ENTER_COMMAND,
|
||||||
(evt: KeyboardEvent) => {
|
(evt: KeyboardEvent) => {
|
||||||
console.log('onEnter', evt)
|
|
||||||
if (
|
if (
|
||||||
onVaultChat &&
|
onVaultChat &&
|
||||||
(Platform.isMacOS ? evt.metaKey : evt.ctrlKey)
|
(Platform.isMacOS ? evt.metaKey : evt.ctrlKey)
|
||||||
|
|||||||
@ -17,7 +17,6 @@ abstract class State implements EventHandler {
|
|||||||
|
|
||||||
handleSettingChanged(settings: InfioSettings): void {
|
handleSettingChanged(settings: InfioSettings): void {
|
||||||
const settingErrors = checkForErrors(settings);
|
const settingErrors = checkForErrors(settings);
|
||||||
console.log(settingErrors);
|
|
||||||
if (!settings.autocompleteEnabled) {
|
if (!settings.autocompleteEnabled) {
|
||||||
new Notice("Copilot is now disabled.");
|
new Notice("Copilot is now disabled.");
|
||||||
this.context.transitionToDisabledManualState()
|
this.context.transitionToDisabledManualState()
|
||||||
|
|||||||
@ -38,7 +38,6 @@ export class DBManager {
|
|||||||
dbManager.templateManager = new TemplateManager(app, dbManager)
|
dbManager.templateManager = new TemplateManager(app, dbManager)
|
||||||
dbManager.conversationManager = new ConversationManager(app, dbManager)
|
dbManager.conversationManager = new ConversationManager(app, dbManager)
|
||||||
|
|
||||||
console.log('infio database initialized.')
|
|
||||||
return dbManager
|
return dbManager
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +109,6 @@ export class DBManager {
|
|||||||
// Split SQL into individual commands and execute them one by one
|
// Split SQL into individual commands and execute them one by one
|
||||||
const commands = migration.sql.split('\n\n').filter(cmd => cmd.trim());
|
const commands = migration.sql.split('\n\n').filter(cmd => cmd.trim());
|
||||||
for (const command of commands) {
|
for (const command of commands) {
|
||||||
console.log('Executing SQL migration:', command);
|
|
||||||
await this.db.query(command);
|
await this.db.query(command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
24
src/main.ts
24
src/main.ts
@ -127,12 +127,12 @@ export default class InfioPlugin extends Plugin {
|
|||||||
editorCallback: (editor: Editor, view: MarkdownView) => {
|
editorCallback: (editor: Editor, view: MarkdownView) => {
|
||||||
this.addSelectionToChat(editor, view)
|
this.addSelectionToChat(editor, view)
|
||||||
},
|
},
|
||||||
hotkeys: [
|
// hotkeys: [
|
||||||
{
|
// {
|
||||||
modifiers: ['Mod', 'Shift'],
|
// modifiers: ['Mod', 'Shift'],
|
||||||
key: 'l',
|
// key: 'l',
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
})
|
})
|
||||||
|
|
||||||
this.addCommand({
|
this.addCommand({
|
||||||
@ -287,12 +287,12 @@ export default class InfioPlugin extends Plugin {
|
|||||||
this.addCommand({
|
this.addCommand({
|
||||||
id: "infio-ai-inline-edit",
|
id: "infio-ai-inline-edit",
|
||||||
name: "infio Inline Edit",
|
name: "infio Inline Edit",
|
||||||
hotkeys: [
|
// hotkeys: [
|
||||||
{
|
// {
|
||||||
modifiers: ['Mod', 'Shift'],
|
// modifiers: ['Mod', 'Shift'],
|
||||||
key: "k",
|
// key: "k",
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
editorCallback: (editor: Editor) => {
|
editorCallback: (editor: Editor) => {
|
||||||
const selection = editor.getSelection();
|
const selection = editor.getSelection();
|
||||||
if (!selection) {
|
if (!selection) {
|
||||||
|
|||||||
@ -31,13 +31,6 @@ export const manualApplyChangesToFile = async (
|
|||||||
throw new Error('Start line cannot be greater than end line')
|
throw new Error('Start line cannot be greater than end line')
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Applying changes to file:', {
|
|
||||||
path: currentFile.path,
|
|
||||||
startLine: effectiveStartLine,
|
|
||||||
endLine: effectiveEndLine,
|
|
||||||
contentLength: content.length
|
|
||||||
})
|
|
||||||
|
|
||||||
// Construct new content
|
// Construct new content
|
||||||
return [
|
return [
|
||||||
...lines.slice(0, effectiveStartLine - 1),
|
...lines.slice(0, effectiveStartLine - 1),
|
||||||
|
|||||||
@ -154,11 +154,9 @@ export function deserializeSettings(data: JSONObject | null | undefined): Result
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isSettingsV0(settings)) {
|
if (isSettingsV0(settings)) {
|
||||||
console.log("Migrating settings from v0 to v1");
|
|
||||||
settings = migrateFromV0ToV1(settings);
|
settings = migrateFromV0ToV1(settings);
|
||||||
}
|
}
|
||||||
if (!isSettingsV1(settings)) {
|
if (!isSettingsV1(settings)) {
|
||||||
console.log("Fixing settings structure and value errors");
|
|
||||||
return fixStructureAndValueErrors(settingsSchema, settings, DEFAULT_SETTINGS);
|
return fixStructureAndValueErrors(settingsSchema, settings, DEFAULT_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user