diff --git a/docs/ErrorDuringTest.md b/docs/ErrorDuringTest.md index d2422742..db25170a 100644 --- a/docs/ErrorDuringTest.md +++ b/docs/ErrorDuringTest.md @@ -49,10 +49,10 @@ it('should test feature', async () => { // For tests that trigger state updates, wait for UI to stabilize it('should update when data changes', async () => { render(); - + // Trigger update someObservable.next(newData); - + // Wait for UI to reflect the change await waitFor(() => { expect(screen.getByText('Updated Content')).toBeInTheDocument(); diff --git a/docs/internal/AICommitMessage.md b/docs/internal/AICommitMessage.md index d644003b..56c5fe85 100644 --- a/docs/internal/AICommitMessage.md +++ b/docs/internal/AICommitMessage.md @@ -7,7 +7,7 @@ This document tracks all entry points for AI-generated commit messages in TidGi. The core AI commit message generation is implemented in `src/services/git/aiCommitMessage.ts`: ```typescript -export async function generateAICommitMessage(wikiFolderPath: string, source: string): Promise +export async function generateAICommitMessage(wikiFolderPath: string, source: string): Promise; ``` This function is called from `src/services/git/index.ts` in the `commitAndSync` method when no commit message is provided. diff --git a/docs/internal/IPCSyncAdaptorAndFSAdaptor.md b/docs/internal/IPCSyncAdaptorAndFSAdaptor.md index 8301758a..23eb5ea7 100644 --- a/docs/internal/IPCSyncAdaptorAndFSAdaptor.md +++ b/docs/internal/IPCSyncAdaptorAndFSAdaptor.md @@ -245,10 +245,10 @@ Benefits: ```typescript // FileSystemWatcher.ts -FILE_DELETION_DELAY_MS = 100 // Delay before processing DELETE events -FILE_INCLUSION_DELAY_MS = 150 // Delay before re-including file after save -GIT_NOTIFICATION_DELAY_MS = 1000 // Debounce for git status notification -SYNCER_TRIGGER_DELAY_MS = 200 // Debounce for syncer trigger +FILE_DELETION_DELAY_MS = 100; // Delay before processing DELETE events +FILE_INCLUSION_DELAY_MS = 150; // Delay before re-including file after save +GIT_NOTIFICATION_DELAY_MS = 1000; // Debounce for git status notification +SYNCER_TRIGGER_DELAY_MS = 200; // Debounce for syncer trigger ``` ### Syncer Configuration diff --git a/docs/internal/PromptTreeNavigation.md b/docs/internal/PromptTreeNavigation.md index cb8f5f56..2117ff26 100644 --- a/docs/internal/PromptTreeNavigation.md +++ b/docs/internal/PromptTreeNavigation.md @@ -37,12 +37,12 @@ When a user clicks a tree node: ```typescript const handleNodeClick = useCallback((event: React.MouseEvent) => { event.stopPropagation(); - + // Use source path if available, otherwise construct from fieldPath - const targetFieldPath = (node.source && node.source.length > 0) - ? node.source + const targetFieldPath = (node.source && node.source.length > 0) + ? node.source : [...fieldPath, node.id]; - + setFormFieldsToScrollTo(targetFieldPath); }, [node.source, node.id, fieldPath, setFormFieldsToScrollTo]); ``` @@ -75,16 +75,16 @@ The EditView component handles the expansion of nested items: useEffect(() => { if (formFieldsToScrollTo.length > 0 && editorMode === 'form') { const savedPath = [...formFieldsToScrollTo]; - + // Wait for RootObjectFieldTemplate to switch tabs setTimeout(() => { setFormFieldsToScrollTo([]); // Clear after tab switches - + // Step 1: Expand top-level item const topLevelKey = savedPath[0]; const firstItemId = savedPath[1]; expandItemsByPath(topLevelKey, [firstItemId]); - + // Step 2: Expand nested children if present if (savedPath.length > 2) { setTimeout(() => { @@ -113,7 +113,7 @@ The store maintains: interface PromptPreviewStore { arrayExpansionStore: Record>; formFieldsToScrollTo: string[]; - + setItemExpanded: (fieldPath: string, index: number, expanded: boolean) => void; setFormFieldsToScrollTo: (path: string[]) => void; } diff --git a/eslint.config.mjs b/eslint.config.mjs index 020ce117..33c2b9eb 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -23,7 +23,7 @@ export default [ }, }, { - files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', "*.env.d.ts"], + files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', '*.env.d.ts'], rules: { '@typescript-eslint/unbound-method': 'off', 'unicorn/prevent-abbreviations': 'off', diff --git a/src/services/agentInstance/promptConcat/Readme.md b/src/services/agentInstance/promptConcat/Readme.md index 4d421448..b53ff881 100644 --- a/src/services/agentInstance/promptConcat/Readme.md +++ b/src/services/agentInstance/promptConcat/Readme.md @@ -51,7 +51,7 @@ const MyLLMToolSchema = z.object({ query: z.string(), limit: z.number().optional().default(10), }).meta({ - title: 'my-tool', // Tool name for LLM + title: 'my-tool', // Tool name for LLM description: 'Search for something', examples: [{ query: 'example', limit: 5 }], });