@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.
@@ -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,MAyC7B,CAAA"}
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
- const todoPath = path.join(worktree, TODO_FILENAME);
9
- await ensureModel(worktree);
10
- const result = await ensureSemanticIndex(worktree, {
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, worktree, todoPath);
36
+ const chatTools = createChatTools(directory, root, todoPath);
35
37
  return {
36
38
  config: async (config) => {
37
39
  configureChatAgents(config, chatTools.toolIds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/opencode-chat",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Chatifier plugin for OpenCode - Adds chat-optimized tools and semantic search",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",