diff --git a/web/src/components/approval-records.tsx b/web/src/components/approval-records.tsx index a5e2e59..c5cbac4 100644 --- a/web/src/components/approval-records.tsx +++ b/web/src/components/approval-records.tsx @@ -206,33 +206,42 @@ function ScriptSnapshotSummary({ input }: { input: InterceptReviewInput }) { {files.map((file) => ( -
-
- {file.path} - {file.sha256 ? SHA-256 {file.sha256.slice(0, 12)}… : null} - {file.bytes != null ? {file.bytes} 字节 : null} -
- {file.read_error ?

{file.read_error}

: null} - {file.content ? ( - - - - - - - - - ) : null} -
+ ))}

这是执行前实际发送给审查模型的脚本快照。

); } +function ScriptFileSnapshot({ file }: { file: NonNullable[number] }) { + const [open, setOpen] = React.useState(false); + return ( +
+
+ {file.path} + {file.sha256 ? SHA-256 {file.sha256.slice(0, 12)}… : null} + {file.bytes != null ? {file.bytes} 字节 : null} +
+ {file.read_error ?

{file.read_error}

: null} + {file.content ? ( + <> + + {open ? : null} + + ) : null} +
+ ); +} + function ModelReviewContext({ input }: { input: InterceptReviewInput }) { return (
@@ -959,7 +968,7 @@ export function ApprovalRecords({ taskId }: { taskId?: string }) { ) : null} {pending.length ? ( -
+
待处理({pending.length})展开后允许或拒绝 @@ -967,7 +976,7 @@ export function ApprovalRecords({ taskId }: { taskId?: string }) {
) : null} -
+
{filtered ? "筛选结果" : "全部记录"}({total})