feat: 问就是封包

This commit is contained in:
claude-code-best
2026-03-31 23:32:58 +08:00
parent d7a729ca68
commit dd9cd782a7
67 changed files with 423 additions and 172 deletions

View File

@@ -140,7 +140,7 @@ function AskUserQuestionPermissionRequestBody(t0) {
$[10] = theme;
$[11] = maxHeight;
} else {
maxHeight = $[11];
maxHeight = $[11] as number;
}
const t3 = Math.min(Math.max(maxHeight, MIN_CONTENT_HEIGHT), maxAllowedHeight);
const t4 = Math.max(maxWidth, MIN_CONTENT_WIDTH);
@@ -177,7 +177,7 @@ function AskUserQuestionPermissionRequestBody(t0) {
const pasteId = nextPasteIdRef.current;
const newContent = {
id: pasteId,
type: "image",
type: "image" as const,
content: base64Image,
mediaType: mediaType || "image/png",
filename: filename || "Pasted image",

View File

@@ -151,7 +151,7 @@ export function ExitPlanModePermissionRequest({
const options = useMemo(() => buildPlanApprovalOptions({
showClearContext,
showUltraplan,
usedPercent: showClearContext ? getContextUsedPercent(usage, mode) : null,
usedPercent: showClearContext ? getContextUsedPercent(usage as any, mode) : null,
isAutoModeAvailable,
isBypassPermissionsModeAvailable,
onFeedbackChange: setPlanFeedback

View File

@@ -62,7 +62,7 @@ function PermissionDecisionInfoItem(t0) {
return <Box flexDirection="column">{Array.from(decisionReason.reasons.entries()).map(t2 => {
const [subcommand, result] = t2 as [string, { behavior: string; decisionReason?: { type: string }; suggestions?: unknown }];
const icon = result.behavior === "allow" ? color("success", theme)(figures.tick) : color("error", theme)(figures.cross);
return <Box flexDirection="column" key={subcommand}><Text>{icon} {subcommand}</Text>{result.decisionReason !== undefined && result.decisionReason.type !== "subcommandResults" && <Text><Text dimColor={true}>{" "}{" "}</Text><Ansi>{decisionReasonDisplayString(result.decisionReason)}</Ansi></Text>}{result.behavior === "ask" && <SuggestedRules suggestions={result.suggestions} />}</Box>;
return <Box flexDirection="column" key={subcommand}><Text>{icon} {subcommand}</Text>{result.decisionReason !== undefined && result.decisionReason.type !== "subcommandResults" && <Text><Text dimColor={true}>{" "}{" "}</Text><Ansi>{decisionReasonDisplayString(result.decisionReason as any)}</Ansi></Text>}{result.behavior === "ask" && <SuggestedRules suggestions={result.suggestions} />}</Box>;
})}</Box>;
}
default:

View File

@@ -102,7 +102,7 @@ function SedEditPermissionRequestInner(t0) {
const {
oldContent,
fileExists
} = use(contentPromise);
} = use(contentPromise) as any;
let t1;
if ($[4] !== oldContent || $[5] !== sedInfo) {
t1 = applySedSubstitution(oldContent, sedInfo);