oh-my-opencode-cohub 1.12.9-beta.5 → 1.12.9
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/index.js +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -27
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAyHlD,QAAA,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAyHlD,QAAA,MAAM,WAAW,EAAE,MA6gBlB,CAAC;AAEF,eAAO,MAAM,MAAM,QAAc,CAAC;AAClC,eAAe,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1768,10 +1768,7 @@ var CoHubPlugin = async (input, options) => {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
const coreRulesInjectionText = ORCHESTRATOR_PROMPT ? `
|
|
1771
|
-
|
|
1772
|
-
--- 核心规则提醒(本轮注入,不持久化) ---
|
|
1773
|
-
${ORCHESTRATOR_PROMPT}
|
|
1774
|
-
--- 注入结束 ---` : null;
|
|
1771
|
+
${ORCHESTRATOR_PROMPT}` : null;
|
|
1775
1772
|
appendLog("critical_rules", coreRulesInjectionText ? `已注入完整提示词: 长度=${ORCHESTRATOR_PROMPT.length}` : "⚠️ ORCHESTRATOR_PROMPT 为空,注入跳过");
|
|
1776
1773
|
const DEFAULT_COUNCIL_CONFIG = {
|
|
1777
1774
|
default_preset: "default",
|
|
@@ -2066,29 +2063,6 @@ ${ORCHESTRATOR_PROMPT}
|
|
|
2066
2063
|
appendLog("messages.transform", `⚠️ 注入后 content 为空,已设空格占位 (session=${sessionID?.slice(0, 20) ?? "?"})`);
|
|
2067
2064
|
}
|
|
2068
2065
|
}
|
|
2069
|
-
for (let i = 0;i < output.messages.length; i++) {
|
|
2070
|
-
const msg = output.messages[i];
|
|
2071
|
-
const parts = msg.parts ?? [];
|
|
2072
|
-
let totalText = "";
|
|
2073
|
-
for (const p of parts) {
|
|
2074
|
-
if (p.type === "text" && p.text)
|
|
2075
|
-
totalText += p.text;
|
|
2076
|
-
}
|
|
2077
|
-
if (!totalText.trim() && parts.length > 0) {
|
|
2078
|
-
let found = false;
|
|
2079
|
-
for (const p of parts) {
|
|
2080
|
-
if (p.type === "text") {
|
|
2081
|
-
p.text = " ";
|
|
2082
|
-
found = true;
|
|
2083
|
-
break;
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
if (!found) {
|
|
2087
|
-
parts.push({ type: "text", text: " " });
|
|
2088
|
-
}
|
|
2089
|
-
appendLog("messages.transform", `⚠️ 消息[${i}] role=${msg.info?.role ?? "?"} content为空,已设占位 (session=${sessionID?.slice(0, 20) ?? "?"})`);
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
2066
|
} catch (err) {
|
|
2093
2067
|
appendLog("messages.transform", "hook 失败", err);
|
|
2094
2068
|
}
|