Feat/mini window (#642)

* feat: new config for tidgi mini window

* chore: upgrade electron-forge

* fix: use 汉语 和 漢語

* feat: shortcut to open mini window

* test: TidGiMenubarWindow

* feat: allow updateWindowProperties on the fly

* fix: wrong icon path

* fix: log not showing error message and stack

* refactor: directly log error when using logger.error

* feat: shortcut to open window

* fix: menubar not closed

* test: e2e for menubar

* test: keyboard shortcut

* test: wiki web content, and refactor to files

* test: update command

* Update Testing.md

* test: menubar settings about menubarSyncWorkspaceWithMainWindow, menubarFixedWorkspaceId

* test: simplify menubar test and cleanup test config

* fix: view missing when execute several test all together

* refactor: use hook to cleanup menubar setting

* refactor: I clear test ai settings to before hook

* Add option to show title bar on menubar window

Introduces a new preference 'showMenubarWindowTitleBar' allowing users to toggle the title bar visibility on the menubar window. Updates related services, interfaces, and UI components to support this feature, and adds corresponding localization strings for English and Chinese.

* refactor: tidgiminiwindow

* refactor: preference keys to right order

* Refactor window dimension checks to use constants

Replaces hardcoded window dimensions with values from windowDimension and WindowNames constants for improved maintainability and consistency in window identification and checks.

* I cleanup test wiki

* Update defaultPreferences.ts

* test: mini window workspace switch

* fix: image broken by ai, and lint

* fix: can't switch to mini window

* refactor: useless todo

* Update index.ts

* refactor: reuse serialize-error

* Update index.ts

* Update testKeyboardShortcuts.ts

* refactor: dup logic

* Update ui.ts

* fix: electron-ipc-cat
This commit is contained in:
lin onetwo 2025-10-21 20:07:04 +08:00 committed by GitHub
parent fa9751e5ea
commit 19ef74a4a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
111 changed files with 4588 additions and 884 deletions

View file

@ -262,7 +262,7 @@ async function executeWikiSearchTool(
}
} catch (error) {
logger.warn(`Error retrieving full tiddler content for ${result.title}`, {
error: error instanceof Error ? error.message : String(error),
error,
});
fullContentResults.push(result);
}
@ -278,7 +278,7 @@ async function executeWikiSearchTool(
};
} catch (error) {
logger.error('Vector search failed', {
error: error instanceof Error ? error.message : String(error),
error,
workspaceID,
query,
});
@ -327,7 +327,7 @@ async function executeWikiSearchTool(
}
} catch (error) {
logger.warn(`Error retrieving tiddler content for ${title}`, {
error: error instanceof Error ? error.message : String(error),
error,
});
results.push({ title });
}
@ -377,7 +377,7 @@ async function executeWikiSearchTool(
};
} catch (error) {
logger.error('Wiki search tool execution error', {
error: error instanceof Error ? error.message : String(error),
error,
parameters,
});
@ -471,7 +471,7 @@ async function executeWikiUpdateEmbeddingsTool(
};
} catch (error) {
logger.error('Wiki update embeddings tool execution error', {
error: error instanceof Error ? error.message : String(error),
error,
parameters,
});
@ -551,7 +551,7 @@ export const wikiSearchPlugin: PromptConcatPlugin = (hooks) => {
callback();
} catch (error) {
logger.error('Error in wiki search tool list injection', {
error: error instanceof Error ? error.message : String(error),
error,
pluginId: pluginConfig.id,
});
callback();
@ -608,7 +608,7 @@ export const wikiSearchPlugin: PromptConcatPlugin = (hooks) => {
latestAiMessage.metadata = { ...latestAiMessage.metadata, isPersisted: true };
} catch (error) {
logger.warn('Failed to persist AI message containing tool call immediately', {
error: error instanceof Error ? error.message : String(error),
error,
messageId: latestAiMessage.id,
});
}
@ -745,7 +745,7 @@ export const wikiSearchPlugin: PromptConcatPlugin = (hooks) => {
});
} catch (error) {
logger.error('Wiki search tool execution failed', {
error: error instanceof Error ? error.message : String(error),
error,
toolCall: toolMatch,
});
@ -802,9 +802,7 @@ Error: ${error instanceof Error ? error.message : String(error)}
callback();
} catch (error) {
logger.error('Error in wiki search handler plugin', {
error: error instanceof Error ? error.message : String(error),
});
logger.error('Error in wiki search handler plugin', { error });
callback();
}
});