@comfanion/workflow 4.7.0 → 4.7.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/package.json
CHANGED
package/src/build-info.json
CHANGED
|
@@ -93,8 +93,8 @@ This will download the embedding model (~100MB) and set up the vector database.`
|
|
|
93
93
|
output += `⚠️ **No indexes created yet**\n\n`
|
|
94
94
|
output += `Create indexes with:\n`
|
|
95
95
|
output += `\`\`\`bash\n`
|
|
96
|
-
output += `npx
|
|
97
|
-
output += `npx
|
|
96
|
+
output += `npx @comfanion/workflow index --index code\n`
|
|
97
|
+
output += `npx @comfanion/workflow index --index docs --dir docs/\n`
|
|
98
98
|
output += `\`\`\`\n`
|
|
99
99
|
} else {
|
|
100
100
|
output += `### Active Indexes\n\n`
|
|
@@ -153,7 +153,7 @@ codesearch({ query: "your search query", index: "${indexName}" })
|
|
|
153
153
|
|
|
154
154
|
To re-index:
|
|
155
155
|
\`\`\`bash
|
|
156
|
-
npx
|
|
156
|
+
npx @comfanion/workflow index --index ${indexName}
|
|
157
157
|
\`\`\``
|
|
158
158
|
|
|
159
159
|
} catch {
|
|
@@ -164,9 +164,9 @@ npx opencode-workflow index --index ${indexName}
|
|
|
164
164
|
|
|
165
165
|
To create this index:
|
|
166
166
|
\`\`\`bash
|
|
167
|
-
npx
|
|
167
|
+
npx @comfanion/workflow index --index ${indexName}
|
|
168
168
|
# Or with specific directory:
|
|
169
|
-
npx
|
|
169
|
+
npx @comfanion/workflow index --index ${indexName} --dir src/
|
|
170
170
|
\`\`\``
|
|
171
171
|
}
|
|
172
172
|
}
|
|
@@ -174,7 +174,7 @@ npx opencode-workflow index --index ${indexName} --dir src/
|
|
|
174
174
|
// REINDEX: Re-index using CLI
|
|
175
175
|
if (args.action === "reindex") {
|
|
176
176
|
try {
|
|
177
|
-
execSync(`npx
|
|
177
|
+
execSync(`npx @comfanion/workflow index --index ${indexName}`, {
|
|
178
178
|
cwd: projectRoot,
|
|
179
179
|
encoding: "utf8",
|
|
180
180
|
timeout: 300000, // 5 min
|
|
@@ -201,7 +201,7 @@ codesearch({ query: "your search query", index: "${indexName}" })
|
|
|
201
201
|
|
|
202
202
|
Try manually:
|
|
203
203
|
\`\`\`bash
|
|
204
|
-
npx
|
|
204
|
+
npx @comfanion/workflow index --index ${indexName} --force
|
|
205
205
|
\`\`\``
|
|
206
206
|
}
|
|
207
207
|
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* codesearch({ query: "error handling", searchAll: true })
|
|
13
13
|
*
|
|
14
14
|
* Prerequisites:
|
|
15
|
-
* npx
|
|
16
|
-
* npx
|
|
17
|
-
* npx
|
|
15
|
+
* npx @comfanion/workflow vectorizer install
|
|
16
|
+
* npx @comfanion/workflow index --index code
|
|
17
|
+
* npx @comfanion/workflow index --index docs
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { tool } from "@opencode-ai/plugin"
|
|
@@ -36,7 +36,7 @@ Examples:
|
|
|
36
36
|
- "how to deploy" with index: "docs" → finds deployment docs
|
|
37
37
|
- "API keys" with index: "config" → finds config with API settings
|
|
38
38
|
|
|
39
|
-
Prerequisites: Run 'npx
|
|
39
|
+
Prerequisites: Run 'npx @comfanion/workflow index --index <name>' first.`,
|
|
40
40
|
|
|
41
41
|
args: {
|
|
42
42
|
query: tool.schema.string().describe("Semantic search query describing what you're looking for"),
|
|
@@ -54,7 +54,7 @@ Prerequisites: Run 'npx opencode-workflow index --index <name>' first.`,
|
|
|
54
54
|
try {
|
|
55
55
|
await fs.access(path.join(vectorizerDir, "node_modules"))
|
|
56
56
|
} catch {
|
|
57
|
-
return `❌ Vectorizer not installed. Run: npx
|
|
57
|
+
return `❌ Vectorizer not installed. Run: npx @comfanion/workflow vectorizer install`
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
try {
|
|
@@ -71,7 +71,7 @@ Prerequisites: Run 'npx opencode-workflow index --index <name>' first.`,
|
|
|
71
71
|
const indexes = await tempIndexer.listIndexes()
|
|
72
72
|
|
|
73
73
|
if (indexes.length === 0) {
|
|
74
|
-
return `❌ No indexes found. Run: npx
|
|
74
|
+
return `❌ No indexes found. Run: npx @comfanion/workflow index --index code`
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
for (const idx of indexes) {
|
|
@@ -90,7 +90,7 @@ Prerequisites: Run 'npx opencode-workflow index --index <name>' first.`,
|
|
|
90
90
|
try {
|
|
91
91
|
await fs.access(hashesFile)
|
|
92
92
|
} catch {
|
|
93
|
-
return `❌ Index "${indexName}" not found. Run: npx
|
|
93
|
+
return `❌ Index "${indexName}" not found. Run: npx @comfanion/workflow index --index ${indexName}`
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
const indexer = await new CodebaseIndexer(projectRoot, indexName).init()
|
|
@@ -100,7 +100,7 @@ Prerequisites: Run 'npx opencode-workflow index --index <name>' first.`,
|
|
|
100
100
|
|
|
101
101
|
if (allResults.length === 0) {
|
|
102
102
|
const scope = args.searchAll ? "any index" : `index "${indexName}"`
|
|
103
|
-
return `No results found in ${scope} for: "${args.query}"\n\nTry:\n- Different keywords\n- Re-index with: npx
|
|
103
|
+
return `No results found in ${scope} for: "${args.query}"\n\nTry:\n- Different keywords\n- Re-index with: npx @comfanion/workflow index --index ${indexName} --force`
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// Format results for the model
|
|
@@ -128,7 +128,7 @@ Prerequisites: Run 'npx opencode-workflow index --index <name>' first.`,
|
|
|
128
128
|
return output
|
|
129
129
|
|
|
130
130
|
} catch (error: any) {
|
|
131
|
-
return `❌ Search failed: ${error.message}\n\nTry re-indexing: npx
|
|
131
|
+
return `❌ Search failed: ${error.message}\n\nTry re-indexing: npx @comfanion/workflow index --index ${args.index || "code"} --force`
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
})
|