mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-12 05:33:50 +08:00
fix: separate btw fallback copy and keep synthetic snapshot overridable
This commit is contained in:
1 parent
eabdf85558
commit
62dca14821
9 files changed
+189
-20
No files matched your search
@@ -459,6 +459,8 @@ export function ApprovalDetail({
|
||||
label={`审批 #${row.id} · ${row.tool_name}`}
|
||||
composerLayout="stacked"
|
||||
placeholder="询问此审批中的脚本或审查理由…"
|
||||
noSnapshotHint="当前审批材料准备好后即可提问"
|
||||
emptyDescription="根据当前审批材料回答,旁路问答不会执行脚本。"
|
||||
suggestions={[
|
||||
"此脚本的作用是什么?",
|
||||
"脚本会修改哪些文件或数据?",
|
||||
|
||||
@@ -53,12 +53,16 @@ function SidePanel({
|
||||
composerLayout,
|
||||
suggestions,
|
||||
placeholder,
|
||||
noSnapshotHint,
|
||||
emptyDescription,
|
||||
}: {
|
||||
side: SideQuestions;
|
||||
label: string;
|
||||
composerLayout: ComposerLayout;
|
||||
suggestions?: string[];
|
||||
placeholder?: string;
|
||||
noSnapshotHint?: string;
|
||||
emptyDescription?: string;
|
||||
}) {
|
||||
const inlineComposer = composerLayout === "inline";
|
||||
const [confirm, setConfirm] = useState(false);
|
||||
@@ -93,13 +97,13 @@ function SidePanel({
|
||||
</Button>
|
||||
</div>
|
||||
<div className="border-b px-3 py-2 text-muted-foreground text-xs">
|
||||
{side.snapshot ? (
|
||||
{side.snapshot?.available ? (
|
||||
<>
|
||||
<p>{side.snapshot.model.model}</p>
|
||||
<p>上下文更新于 {new Date(side.snapshot.captured_at).toLocaleString()}</p>
|
||||
</>
|
||||
) : (
|
||||
"有任务描述、Planner/Worker 结果或发现记录后即可提问"
|
||||
noSnapshotHint ?? "主 Agent 首次运行后即可提问"
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
@@ -120,7 +124,7 @@ function SidePanel({
|
||||
<Empty>
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>随时问一个问题</EmptyTitle>
|
||||
<EmptyDescription>根据当前任务上下文回答,主任务继续运行;暂停或尚未运行主 Agent 也可以提问。</EmptyDescription>
|
||||
<EmptyDescription>{emptyDescription ?? "根据当前 Agent 的上下文回答,主任务继续运行。"}</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
)}
|
||||
@@ -158,9 +162,9 @@ function SidePanel({
|
||||
</div>
|
||||
</div>
|
||||
<div className="shrink-0 border-t p-3">
|
||||
{(side.error || side.snapshot?.reason) && (
|
||||
{(side.error || side.snapshotError || side.snapshot?.reason) && (
|
||||
<Alert variant="destructive" className="mb-2">
|
||||
<AlertDescription>{side.error || side.snapshot?.reason}</AlertDescription>
|
||||
<AlertDescription>{side.error || side.snapshotError || side.snapshot?.reason}</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
<InputGroup className={inlineComposer ? "min-h-10" : "min-h-9"}>
|
||||
@@ -252,6 +256,8 @@ export function SideQuestionWorkspace({
|
||||
composerLayout = "stacked",
|
||||
suggestions,
|
||||
placeholder,
|
||||
noSnapshotHint,
|
||||
emptyDescription,
|
||||
className,
|
||||
mainClassName,
|
||||
}: {
|
||||
@@ -262,6 +268,8 @@ export function SideQuestionWorkspace({
|
||||
composerLayout?: ComposerLayout;
|
||||
suggestions?: string[];
|
||||
placeholder?: string;
|
||||
noSnapshotHint?: string;
|
||||
emptyDescription?: string;
|
||||
className?: string;
|
||||
mainClassName?: string;
|
||||
}) {
|
||||
@@ -281,6 +289,8 @@ export function SideQuestionWorkspace({
|
||||
composerLayout={composerLayout}
|
||||
suggestions={suggestions}
|
||||
placeholder={placeholder}
|
||||
noSnapshotHint={noSnapshotHint}
|
||||
emptyDescription={emptyDescription}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -302,6 +312,8 @@ export function SideQuestionWorkspace({
|
||||
composerLayout={composerLayout}
|
||||
suggestions={suggestions}
|
||||
placeholder={placeholder}
|
||||
noSnapshotHint={noSnapshotHint}
|
||||
emptyDescription={emptyDescription}
|
||||
/>
|
||||
</ResizablePanel>
|
||||
</ResizablePanelGroup>
|
||||
@@ -320,6 +332,8 @@ export function SideQuestionWorkspace({
|
||||
composerLayout={composerLayout}
|
||||
suggestions={suggestions}
|
||||
placeholder={placeholder}
|
||||
noSnapshotHint={noSnapshotHint}
|
||||
emptyDescription={emptyDescription}
|
||||
/>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
|
||||
Reference in new issue
Block a user