delete debug log

This commit is contained in:
duanfuxiang 2025-01-07 14:22:56 +08:00
parent 0f42ce3b80
commit cd172e371d
8 changed files with 12 additions and 32 deletions

1
package-lock.json generated
View File

@ -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",

View File

@ -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

View File

@ -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)

View File

@ -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()

View File

@ -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);
}
}

View File

@ -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) {

View File

@ -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),

View File

@ -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);
}