mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-01-16 08:21:55 +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",
|
||||
"integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"array-includes": "^3.1.8",
|
||||
"array.prototype.findlast": "^1.2.5",
|
||||
|
||||
@ -309,12 +309,6 @@ const Chat = forwardRef<ChatRef, ChatProps>((props, ref) => {
|
||||
handleScrollToBottom()
|
||||
}
|
||||
}
|
||||
// for debugging
|
||||
setChatMessages((prevChatHistory) => {
|
||||
const lastMessage = prevChatHistory[prevChatHistory.length - 1];
|
||||
console.log("Last complete message:", lastMessage?.content);
|
||||
return prevChatHistory;
|
||||
});
|
||||
} catch (error) {
|
||||
if (error.name === 'AbortError') {
|
||||
return
|
||||
|
||||
@ -16,7 +16,6 @@ export default function OnEnterPlugin({
|
||||
const removeListener = editor.registerCommand(
|
||||
KEY_ENTER_COMMAND,
|
||||
(evt: KeyboardEvent) => {
|
||||
console.log('onEnter', evt)
|
||||
if (
|
||||
onVaultChat &&
|
||||
(Platform.isMacOS ? evt.metaKey : evt.ctrlKey)
|
||||
|
||||
@ -17,7 +17,6 @@ abstract class State implements EventHandler {
|
||||
|
||||
handleSettingChanged(settings: InfioSettings): void {
|
||||
const settingErrors = checkForErrors(settings);
|
||||
console.log(settingErrors);
|
||||
if (!settings.autocompleteEnabled) {
|
||||
new Notice("Copilot is now disabled.");
|
||||
this.context.transitionToDisabledManualState()
|
||||
|
||||
@ -38,7 +38,6 @@ export class DBManager {
|
||||
dbManager.templateManager = new TemplateManager(app, dbManager)
|
||||
dbManager.conversationManager = new ConversationManager(app, dbManager)
|
||||
|
||||
console.log('infio database initialized.')
|
||||
return dbManager
|
||||
}
|
||||
|
||||
@ -110,7 +109,6 @@ export class DBManager {
|
||||
// Split SQL into individual commands and execute them one by one
|
||||
const commands = migration.sql.split('\n\n').filter(cmd => cmd.trim());
|
||||
for (const command of commands) {
|
||||
console.log('Executing SQL migration:', 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) => {
|
||||
this.addSelectionToChat(editor, view)
|
||||
},
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ['Mod', 'Shift'],
|
||||
key: 'l',
|
||||
},
|
||||
],
|
||||
// hotkeys: [
|
||||
// {
|
||||
// modifiers: ['Mod', 'Shift'],
|
||||
// key: 'l',
|
||||
// },
|
||||
// ],
|
||||
})
|
||||
|
||||
this.addCommand({
|
||||
@ -287,12 +287,12 @@ export default class InfioPlugin extends Plugin {
|
||||
this.addCommand({
|
||||
id: "infio-ai-inline-edit",
|
||||
name: "infio Inline Edit",
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ['Mod', 'Shift'],
|
||||
key: "k",
|
||||
},
|
||||
],
|
||||
// hotkeys: [
|
||||
// {
|
||||
// modifiers: ['Mod', 'Shift'],
|
||||
// key: "k",
|
||||
// },
|
||||
// ],
|
||||
editorCallback: (editor: Editor) => {
|
||||
const selection = editor.getSelection();
|
||||
if (!selection) {
|
||||
|
||||
@ -31,13 +31,6 @@ export const manualApplyChangesToFile = async (
|
||||
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
|
||||
return [
|
||||
...lines.slice(0, effectiveStartLine - 1),
|
||||
|
||||
@ -154,11 +154,9 @@ export function deserializeSettings(data: JSONObject | null | undefined): Result
|
||||
}
|
||||
|
||||
if (isSettingsV0(settings)) {
|
||||
console.log("Migrating settings from v0 to v1");
|
||||
settings = migrateFromV0ToV1(settings);
|
||||
}
|
||||
if (!isSettingsV1(settings)) {
|
||||
console.log("Fixing settings structure and value errors");
|
||||
return fixStructureAndValueErrors(settingsSchema, settings, DEFAULT_SETTINGS);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user