@gitsense/gscb-git-tools 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common/metadata-manager.js +85 -55
- package/dist/cjs/common/metadata-manager.js.map +1 -1
- package/dist/cjs/importer/chat-manager/chat-manager.js +19 -8
- package/dist/cjs/importer/chat-manager/chat-manager.js.map +1 -1
- package/dist/cjs/importer/chat-manager/hierarchy-manager.js +1 -1
- package/dist/cjs/importer/chat-manager/hierarchy-manager.js.map +1 -1
- package/dist/cjs/importer/core/directory-processor.js +5 -2
- package/dist/cjs/importer/core/directory-processor.js.map +1 -1
- package/dist/cjs/importer/core/import-processor.js +15 -4
- package/dist/cjs/importer/core/import-processor.js.map +1 -1
- package/dist/cjs/importer/file-processor.js +12 -12
- package/dist/cjs/importer/file-processor.js.map +1 -1
- package/dist/cjs/importer/tree-processor.js +11 -9
- package/dist/cjs/importer/tree-processor.js.map +1 -1
- package/dist/esm/common/metadata-manager.js +85 -55
- package/dist/esm/common/metadata-manager.js.map +1 -1
- package/dist/esm/importer/chat-manager/chat-manager.js +19 -8
- package/dist/esm/importer/chat-manager/chat-manager.js.map +1 -1
- package/dist/esm/importer/chat-manager/hierarchy-manager.js +1 -1
- package/dist/esm/importer/chat-manager/hierarchy-manager.js.map +1 -1
- package/dist/esm/importer/core/directory-processor.js +5 -2
- package/dist/esm/importer/core/directory-processor.js.map +1 -1
- package/dist/esm/importer/core/import-processor.js +15 -4
- package/dist/esm/importer/core/import-processor.js.map +1 -1
- package/dist/esm/importer/file-processor.js +12 -12
- package/dist/esm/importer/file-processor.js.map +1 -1
- package/dist/esm/importer/tree-processor.js +11 -9
- package/dist/esm/importer/tree-processor.js.map +1 -1
- package/dist/index.d.ts +20 -18
- package/package.json +1 -1
|
@@ -4,14 +4,13 @@ import { Utils } from './core/utils.js';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Component: Tree Processor
|
|
7
|
-
* Block-UUID:
|
|
8
|
-
* Parent-UUID:
|
|
9
|
-
* Version: 4.
|
|
10
|
-
*
|
|
7
|
+
* Block-UUID: 8dae0f9e-6bbf-4dc9-876a-9f5398f26624
|
|
8
|
+
* Parent-UUID: 5a7b9c3d-2e1f-4a5b-8c7d-6e5f4a3b2c1d
|
|
9
|
+
* Version: 4.1.0
|
|
10
|
+
* Description: Add support for handling deleted files and directories
|
|
11
11
|
* Language: TypeScript
|
|
12
|
-
* Created-at: 2025-
|
|
13
|
-
*
|
|
14
|
-
* Authors: Claude 3.5 Sonnet (v3.0.0), Bard, Claude 3.5 Sonnet (v3.1.0), together.ai - DeepSeek v3 (v3.3.0), Claude 3.7 Sonnet (v3.4.0), together.ai - DeepSeek v3 (v4.0.0)
|
|
12
|
+
* Created-at: 2025-09-18T21:48:15.228Z
|
|
13
|
+
* Authors: Claude 3.5 Sonnet (v3.0.0), Bard, Claude 3.5 Sonnet (v3.1.0), together.ai - DeepSeek v3 (v3.3.0), Claude 3.7 Sonnet (v3.4.0), together.ai - DeepSeek v3 (v4.0.0), Qwen 3 Coder 480B - Cerebras (v4.1.0)
|
|
15
14
|
*/
|
|
16
15
|
class TreeProcessor {
|
|
17
16
|
gitRepo;
|
|
@@ -100,8 +99,11 @@ class TreeProcessor {
|
|
|
100
99
|
name: path.basename(dirPath),
|
|
101
100
|
tokens: null,
|
|
102
101
|
commit: null,
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
import: {
|
|
103
|
+
status: 'importing',
|
|
104
|
+
startedAt: now,
|
|
105
|
+
finishedAt: null
|
|
106
|
+
}
|
|
105
107
|
};
|
|
106
108
|
// Use ChatManager to create the chat
|
|
107
109
|
const chatId = await this.chatManager.createChat(type, path.basename(dirPath), parentChatId, this.repoGroupId, meta, '', orderWeight);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-processor.js","sources":["../../../src/importer/tree-processor.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA
|
|
1
|
+
{"version":3,"file":"tree-processor.js","sources":["../../../src/importer/tree-processor.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;;;;;;;;;AASG;MAcU,aAAa,CAAA;AAED,IAAA,OAAA;AACA,IAAA,WAAA;AACA,IAAA,aAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;IALrB,WACqB,CAAA,OAAmB,EACnB,WAAwB,EACxB,aAA4B,EAC5B,WAAmB,EACnB,MAAc,EAAA;QAJd,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAa,CAAA,aAAA,GAAb,aAAa;QACb,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAM,CAAA,MAAA,GAAN,MAAM;;AAG3B;;AAEG;IACH,MAAM,YAAY,CAAC,UAAkB,EAAA;AACjC,QAAA,IAAI;;YAEA,MAAM,IAAI,CAAC,gBAAgB,CAAC,EAAE,EAAE,UAAU,CAAC;;QAC7C,OAAO,KAAK,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,CAAA,yBAAA,EAA4B,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAE,CAAA,CAAC;;;AAI7G;;;AAGG;IACK,MAAM,gBAAgB,CAC1B,OAAe,EACf,YAAoB,EACpB,UAAkB,EAAE,EAAA;AAEpB,QAAA,IAAI;;YAEA,IAAI,WAAW,GAAG,CAAC;;AAGnB,YAAA,MAAM,SAAS,GAAG,OAAO,KAAK;AAC1B,kBAAE;AACF,kBAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,CAAC;;YAGjF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC;;YAGzD,MAAM,WAAW,GAAG;iBACf,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;AAC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|
4
4
|
/**
|
|
5
5
|
* Component: Shared Types
|
|
6
|
-
* Block-UUID:
|
|
6
|
+
* Block-UUID: a4699409-238b-4360-9ac0-ca441128fe55
|
|
7
7
|
* Parent-UUID: 3b1e5a1f-0e3a-4b0d-8e1a-7f8b9c0d1e2f
|
|
8
|
-
* Version: 5.
|
|
9
|
-
* Description:
|
|
8
|
+
* Version: 5.3.0
|
|
9
|
+
* Description: Defines shared types for the GitSense Chat Bridge tools, including metadata interfaces for various chat levels and configuration options.
|
|
10
10
|
* Language: TypeScript
|
|
11
11
|
* Created-at: 2025-02-28T12:00:00.000Z
|
|
12
|
-
* Updated-at: 2025-
|
|
12
|
+
* Updated-at: 2025-10-01T05:20:00.000Z
|
|
13
13
|
* Authors: OpenRouter - DeepSeek v3 (v1.0.0), Claude 3.5 Sonnet (v2.0.0), Bard, together.ai - DeepSeek v3 (v3.2.0),
|
|
14
|
-
* DeepSeek v3 (v4.0.0), together.ai - DeepSeek v3 (v5.0.0)
|
|
14
|
+
* DeepSeek v3 (v4.0.0), together.ai - DeepSeek v3 (v5.0.0), Qwen 3 Coder 480B - Cerebras (v5.1.0),
|
|
15
|
+
* Qwen 3 Coder 480B - Cerebras (v5.2.0), Qwen 3 Coder 480B - Cerebras (v5.3.0)
|
|
15
16
|
*/
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Allowed import status
|
|
20
|
+
*/
|
|
21
|
+
type ImportStatus = '' | 'imported' | 'importing' | 'import-failed' | 'deleted';
|
|
17
22
|
interface ImportOptions {
|
|
18
23
|
maxFileSize?: number;
|
|
19
24
|
skipPatterns?: RegExp[];
|
|
@@ -29,7 +34,7 @@ type GroupType = 'git-repos' | 'git-repo-owner' | 'git-repo' | 'fs-trees' | 'fs-
|
|
|
29
34
|
/**
|
|
30
35
|
* Allowed chat types
|
|
31
36
|
*/
|
|
32
|
-
type ChatType = 'git-repos' | 'git-repo-owner' | 'git-repo' | 'git-ref' | 'git-branch' | 'git-commit' | 'git-tree' | 'git-blob';
|
|
37
|
+
type ChatType = 'git-repos' | 'git-repo-owner' | 'git-repo' | 'git-ref' | 'git-branch' | 'git-commit' | 'git-tag' | 'git-tree' | 'git-blob';
|
|
33
38
|
/**
|
|
34
39
|
* Allowed reference types
|
|
35
40
|
*/
|
|
@@ -131,18 +136,6 @@ declare class Logger {
|
|
|
131
136
|
error(message: string, error?: unknown): void;
|
|
132
137
|
}
|
|
133
138
|
|
|
134
|
-
/**
|
|
135
|
-
* Component: Chat Manager
|
|
136
|
-
* Block-UUID: 7f9a0b1c-2d3e-4f5a-8b9c-0d1e2f3a4b5c
|
|
137
|
-
* Parent-UUID: 5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b
|
|
138
|
-
* Version: 2.0.0
|
|
139
|
-
* Purpose: Core class for managing chats, groups, and messages, with proxy methods for other managers
|
|
140
|
-
* Language: TypeScript
|
|
141
|
-
* Created-at: 2025-03-15T02:19:00.075Z
|
|
142
|
-
* Updated-at: 2025-03-16T06:45:00.075Z
|
|
143
|
-
* Authors: together.ai - DeepSeek v3 (v1.0.0), OpenRouter - Gemini Flash 2.0 (v1.1.0), together.ai - DeepSeek v3 (v2.0.0)
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
139
|
declare class ChatManager {
|
|
147
140
|
private readonly dbClient;
|
|
148
141
|
private readonly gitRepo;
|
|
@@ -185,6 +178,15 @@ declare class ChatManager {
|
|
|
185
178
|
* Marks a chat as failed to import.
|
|
186
179
|
*/
|
|
187
180
|
markImportFailed(chatId: number, error: Error): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Updates the import metadata for the parent git-repo chat.
|
|
183
|
+
* This should be called when a git-ref import starts or finishes.
|
|
184
|
+
* @param refChatId The ID of the git-ref chat.
|
|
185
|
+
* @param refName The name of the git-ref (e.g., branch name) that is being imported.
|
|
186
|
+
* @param action 'start' or 'finish'
|
|
187
|
+
* @param status Optional status for 'finish' action ('imported' or 'import-failed')
|
|
188
|
+
*/
|
|
189
|
+
updateParentRepoImportMetadata(refChatId: number, refName: string, action: 'start' | 'finish', status?: ImportStatus): Promise<void>;
|
|
188
190
|
/**
|
|
189
191
|
* Updates metadata for a file chat.
|
|
190
192
|
*/
|