@howaboua/opencode-chat 0.1.0 → 0.1.1
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/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAQjD,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAQjD,eAAO,MAAM,eAAe,EAAE,MA4C7B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,11 @@ import { replaceSystemPrompt } from "./system";
|
|
|
5
5
|
import { createChatTools } from "./tools";
|
|
6
6
|
import { ensureSemanticIndex, ensureModel } from "./semantic";
|
|
7
7
|
export const ChatifierPlugin = async ({ directory, worktree }) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
8
|
+
// Fall back to directory if worktree is empty (not a git repo)
|
|
9
|
+
const root = worktree && worktree !== "/" ? worktree : directory;
|
|
10
|
+
const todoPath = path.join(root, TODO_FILENAME);
|
|
11
|
+
await ensureModel(root);
|
|
12
|
+
const result = await ensureSemanticIndex(root, {
|
|
11
13
|
mode: "changed",
|
|
12
14
|
maxTargets: 100,
|
|
13
15
|
onProgress: (progress) => {
|
|
@@ -31,7 +33,7 @@ export const ChatifierPlugin = async ({ directory, worktree }) => {
|
|
|
31
33
|
else if (result.total === 0 && result.skipped > 0) {
|
|
32
34
|
console.log(`[semantic] index up to date (${result.skipped} files unchanged)`);
|
|
33
35
|
}
|
|
34
|
-
const chatTools = createChatTools(directory,
|
|
36
|
+
const chatTools = createChatTools(directory, root, todoPath);
|
|
35
37
|
return {
|
|
36
38
|
config: async (config) => {
|
|
37
39
|
configureChatAgents(config, chatTools.toolIds);
|