mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-03-06 22:10:57 -08:00
lint
This commit is contained in:
parent
965f3100fb
commit
f91cce6e8e
6 changed files with 17 additions and 17 deletions
|
|
@ -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(<Component />);
|
||||
|
||||
|
||||
// Trigger update
|
||||
someObservable.next(newData);
|
||||
|
||||
|
||||
// Wait for UI to reflect the change
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText('Updated Content')).toBeInTheDocument();
|
||||
|
|
|
|||
|
|
@ -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<string | undefined>
|
||||
export async function generateAICommitMessage(wikiFolderPath: string, source: string): Promise<string | undefined>;
|
||||
```
|
||||
|
||||
This function is called from `src/services/git/index.ts` in the `commitAndSync` method when no commit message is provided.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<string, Record<number, boolean>>;
|
||||
formFieldsToScrollTo: string[];
|
||||
|
||||
|
||||
setItemExpanded: (fieldPath: string, index: number, expanded: boolean) => void;
|
||||
setFormFieldsToScrollTo: (path: string[]) => void;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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 }],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue