文案(智能体):停止 / 方案 / 子会话 / 压缩上下文等按术语表与 human-copy 重写
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
0338037a96
commit
775d1589e4
16 files changed
+49
-49
No files matched your search
@@ -29,7 +29,7 @@ export function authDenial(call: Pick<ToolCallView, "status" | "outputSummary">)
|
||||
/** 被服务端拒绝(白名单拦截或授权校验失败) */
|
||||
export const isDenied = (call: ToolCallView) => call.status === "denied" || authDenial(call) !== null;
|
||||
|
||||
/** 拒绝的一行说明:需要批准 / 本次没有开放 / 次数用完 */
|
||||
/** 拒绝的一行说明:需要批准 / 这次会话没开放 / 次数用完 */
|
||||
export function deniedReason(call: ToolCallView): { text: string; approvable: boolean } {
|
||||
const auth = authDenial(call);
|
||||
if (auth) {
|
||||
@@ -37,8 +37,8 @@ export function deniedReason(call: ToolCallView): { text: string; approvable: bo
|
||||
if (/自动化总开关|只读对账/.test(auth)) return { text: "自动执行已关闭", approvable: false };
|
||||
return { text: "需要你批准", approvable: true };
|
||||
}
|
||||
if (call.reason && /预算|次数/.test(call.reason)) return { text: "调用次数用完了", approvable: false };
|
||||
return { text: "本次没有开放", approvable: false };
|
||||
if (call.reason && /预算|次数/.test(call.reason)) return { text: "工具调用次数已用完", approvable: false };
|
||||
return { text: "这次会话没开放这个能力", approvable: false };
|
||||
}
|
||||
|
||||
// ── 进度行的人话计数 ──
|
||||
|
||||
Reference in new issue
Block a user