@a1hvdy/cc-openclaw 0.5.1 → 0.5.2
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 +1 -1
- package/vendor/openai-compat.js +9 -1
package/package.json
CHANGED
package/vendor/openai-compat.js
CHANGED
|
@@ -411,7 +411,15 @@ export async function handleChatCompletion(manager, body, headers, res) {
|
|
|
411
411
|
const __ccAllowBuiltins = process.env.CC_OPENCLAW_ALLOW_BUILTINS === '1';
|
|
412
412
|
const __ccAffirmation = 'You are an AI assistant with FULL Claude Code CLI tools available natively: Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, NotebookEdit, plus gh, npm, pm2, openclaw, and any MCP-bridged tools (invoke via Bash). Use tools directly via your normal tool_use mechanism.\n' +
|
|
413
413
|
'CRITICAL — anti-hallucination: NEVER claim "I have no tools", "I cannot run commands", "I do not have access to this environment", "I am operating as a pure LLM behind an API proxy", or any similar phrasing. Those statements are FALSE in this runtime. If unsure whether a tool is available, ATTEMPT it; the runtime returns a concrete error if not.\n' +
|
|
414
|
-
'When a request needs action, ACT — do not narrate what you would do. Default to executing
|
|
414
|
+
'When a request needs action, ACT — do not narrate what you would do. Default to executing.\n' +
|
|
415
|
+
'\n' +
|
|
416
|
+
'TURN-END INSIGHT (v0.5.2): For any turn involving reasoning, investigation, fixes, or non-trivial decisions, end your reply with a `★ Insight ─` fenced block summarizing 1–3 key takeaways the user should remember from this turn. Format EXACTLY:\n' +
|
|
417
|
+
'\n' +
|
|
418
|
+
'★ Insight ─────────────────────────────────────\n' +
|
|
419
|
+
'[1–3 short concrete takeaways, one per line, dense and specific to THIS turn — not generic advice]\n' +
|
|
420
|
+
'─────────────────────────────────────────────────\n' +
|
|
421
|
+
'\n' +
|
|
422
|
+
'Skip the block ONLY for trivial turns (greetings, single-fact answers, "/new" greetings, command echoes). When in doubt, include it. The visual fence (★ + dashes) is parsed by the channel adapter to surface the takeaway as the live-card tip — keep the inner content under ~300 chars total so it fits the tip slot. Do NOT add markdown bold/headers inside the block; plain prose wins.';
|
|
415
423
|
if (__ccAllowBuiltins) {
|
|
416
424
|
sessionConfig.systemPrompt = extracted.systemPrompt
|
|
417
425
|
? `${__ccAffirmation}\n\n${extracted.systemPrompt}`
|