cc-claw 0.20.16 → 0.20.18
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/cli.js +14 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var VERSION;
|
|
|
33
33
|
var init_version = __esm({
|
|
34
34
|
"src/version.ts"() {
|
|
35
35
|
"use strict";
|
|
36
|
-
VERSION = true ? "0.20.
|
|
36
|
+
VERSION = true ? "0.20.18" : (() => {
|
|
37
37
|
try {
|
|
38
38
|
return JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8")).version ?? "unknown";
|
|
39
39
|
} catch {
|
|
@@ -13715,6 +13715,9 @@ function spawnQuery(adapter, config2, model2, cancelState, thinkingLevel, timeou
|
|
|
13715
13715
|
...config2.cwd ? { cwd: config2.cwd } : {}
|
|
13716
13716
|
});
|
|
13717
13717
|
proc.unref();
|
|
13718
|
+
if (proc.stdin) {
|
|
13719
|
+
proc.stdin.end();
|
|
13720
|
+
}
|
|
13718
13721
|
cancelState.process = proc;
|
|
13719
13722
|
const timeoutState = { firstResponse: false, contentSilence: false };
|
|
13720
13723
|
let timedOut = false;
|
|
@@ -15860,14 +15863,17 @@ async function classifyWithLlm(text) {
|
|
|
15860
15863
|
return null;
|
|
15861
15864
|
}
|
|
15862
15865
|
async function classifyWithOllama(text) {
|
|
15863
|
-
const
|
|
15866
|
+
const ollamaStore = await Promise.resolve().then(() => (init_store6(), store_exports6));
|
|
15864
15867
|
const ollamaClient = await Promise.resolve().then(() => (init_client(), client_exports));
|
|
15865
|
-
const servers =
|
|
15868
|
+
const servers = ollamaStore.listServers();
|
|
15866
15869
|
const onlineServer = servers.find((s) => s.status === "online");
|
|
15867
15870
|
if (!onlineServer) return null;
|
|
15868
|
-
const
|
|
15869
|
-
|
|
15870
|
-
|
|
15871
|
+
const allModels = ollamaStore.listModels(onlineServer.id);
|
|
15872
|
+
const chatModels = allModels.filter(
|
|
15873
|
+
(m) => !/embed|nomic|e5|bge/i.test(m.name)
|
|
15874
|
+
);
|
|
15875
|
+
if (chatModels.length === 0) return null;
|
|
15876
|
+
const sorted = [...chatModels].sort(
|
|
15871
15877
|
(a, b) => (a.sizeBytes ?? Infinity) - (b.sizeBytes ?? Infinity)
|
|
15872
15878
|
);
|
|
15873
15879
|
const model2 = sorted[0].name;
|
|
@@ -16032,8 +16038,8 @@ var init_classify = __esm({
|
|
|
16032
16038
|
// "what is", "what version", "what does"
|
|
16033
16039
|
/^(?:which|where|when|why|who)\s+/i,
|
|
16034
16040
|
// "which file", "where is", "when did"
|
|
16035
|
-
/^(?:how\s+(?:do|does|can|did|many|much|long|often|come))\s+/i,
|
|
16036
|
-
// "how do I", "how many"
|
|
16041
|
+
/^(?:how\s+(?:do|does|can|did|many|much|long|often|come|are|is|was|were|about))\s+/i,
|
|
16042
|
+
// "how do I", "how many", "how are you"
|
|
16037
16043
|
/^(?:show|tell|list|explain|describe|summarize|display)\s+(?:me\s+)?/i,
|
|
16038
16044
|
/^(?:do you|can you|could you|are you|is there|are there)\s+(?:know|have|see|find|show|tell|check|list|explain|describe)\s+/i,
|
|
16039
16045
|
/^(?:give\s+me|get\s+me)\s+(?:the|a|my|an|current|latest)\s+/i,
|
package/package.json
CHANGED