@zhin.js/adapter-sandbox 1.1.23 → 1.1.24
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/CHANGELOG.md +31 -0
- package/adapters/sandbox/index.js +16 -7
- package/adapters/sandbox/index.ts +16 -7
- package/package.json +17 -17
- package/pages/index/RichTextEditor.js +1 -15
- package/pages/index/RichTextEditor.tsx +4 -15
- package/pages/index/SandboxChat.js +3 -2
- package/pages/index/SandboxChat.tsx +4 -1
- package/pages/index/styles.js +200 -0
- package/pages/index/styles.ts +199 -0
- package/plugin.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @zhin.js/adapter-process
|
|
2
2
|
|
|
3
|
+
## 1.1.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 41ff1a5: ADR 0044 C5: every official adapter now declares a capability `profile` (its `segments` moved into `profile.default.messaging.segments`). icqq declares the complete profile (per conversation kind: scene, all 14 actions with real limits, events, feedback, delivery) and implements the seven new management ports (`pokeUser`, `unmuteGroupMember`, `muteAllGroupMembers`, `setGroupCard`, `setGroupTitle`, `setGroupEssence`, `inviteGroupMember`) with fresh bot-role reads. qq official declares its passive reply windows; undeclared capabilities stay unsupported.
|
|
8
|
+
- 299863a: ADR 0044 C3: runtime consumers read capabilities instead of platform names. Scene facts (group info, member profile) are queried where the profile declares `scene.groupInfo` / `scene.memberProfile`; activity feedback (reaction, typing, status message, refresh interval, quote-only delivery) follows `feedback`, `actions.reaction` and `delivery.proactive` and the per-platform table is gone; large inline media is spooled only where `delivery.spool` is declared; the sandbox ingress and its console shell follow a new additive `runtime.sandbox` capability. `defineAgentTool` and Skill frontmatter accept `requiresCapabilities` (for example `actions.mute`), evaluated against the per-turn `TurnCapabilities`, so moderation tools disappear when the Bot is not an administrator and return when it is; the icqq/qq keyword boost in tool selection is removed and the icqq group-admin tools are tagged. The `icqq` command-line special case in the exec policy is now a generic `registerSensitiveExecCommand` rule registered by the icqq plugin. `EndpointCapabilities` gains a serializable per-kind `kinds` view. Adapters without a profile keep their previous behaviour (their derived profile also reads the management ports they implement).
|
|
9
|
+
- 4fe49b5: 支持配置按需生效:分离保存与有效版本,独立变更先应用,账号资料更新保留连接,模型按回合使用确定版本;Console 返回结构化应用结果。监听改为仅显式 --watch 启用,开发模板显式选择源码和配置监听。
|
|
10
|
+
|
|
11
|
+
自变更消费配置应用回执,避免已处理配置被二次重载;持久化本次写入修订和应用结果,未知结果或修订冲突时停止自动续作并保留现场,恢复不会覆盖未经本次变更确认的配置。
|
|
12
|
+
|
|
13
|
+
- cce07db: Refresh adapter Console pages with lightweight black/white/gray surfaces, clearer account and login workflows, responsive layouts, accessible focus states, and self-contained light/dark styling. Apply the shared visual language to Sandbox conversations and Bilibili comment review while preserving runtime authority and platform send paths.
|
|
14
|
+
- Updated dependencies [b249e5e]
|
|
15
|
+
- Updated dependencies [57661f6]
|
|
16
|
+
- Updated dependencies [cbd3f14]
|
|
17
|
+
- Updated dependencies [299863a]
|
|
18
|
+
- Updated dependencies [aaa93d7]
|
|
19
|
+
- Updated dependencies [bd524d1]
|
|
20
|
+
- Updated dependencies [126ae99]
|
|
21
|
+
- Updated dependencies [4fe49b5]
|
|
22
|
+
- Updated dependencies [cce07db]
|
|
23
|
+
- Updated dependencies [b652db3]
|
|
24
|
+
- Updated dependencies [0315ba0]
|
|
25
|
+
- @zhin.js/core@1.1.56
|
|
26
|
+
- @zhin.js/adapter@1.1.28
|
|
27
|
+
- @zhin.js/im-contract@1.1.11
|
|
28
|
+
- @zhin.js/skill@1.1.13
|
|
29
|
+
- @zhin.js/host-http@1.1.14
|
|
30
|
+
- @zhin.js/feature-kit@1.1.12
|
|
31
|
+
- @zhin.js/client@1.1.24
|
|
32
|
+
- @zhin.js/page@1.1.14
|
|
33
|
+
|
|
3
34
|
## 1.1.23
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -8,13 +8,22 @@ import {} from "../../lib/protocol.js";
|
|
|
8
8
|
export { SandboxWsEndpoint } from "../../lib/endpoint.js";
|
|
9
9
|
export default defineAdapter({
|
|
10
10
|
capabilities: ['inbound', 'outbound'],
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
profile: {
|
|
12
|
+
default: {
|
|
13
|
+
messaging: {
|
|
14
|
+
// Console UI 直连 URL 媒体、直接渲染 base64 内联媒体;path 由端点读盘
|
|
15
|
+
// 物化为 base64 内联(sandbox 无平台上传通道)。交互段由 Console 原生承载。
|
|
16
|
+
segments: {
|
|
17
|
+
html: 'direct',
|
|
18
|
+
markdown: 'native',
|
|
19
|
+
outboundMedia: ['url', 'base64', 'path'],
|
|
20
|
+
interactive: 'native',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
delivery: { send: true, proactive: true, spool: true },
|
|
24
|
+
// The authenticated local ingress: its configured owner may turn wire metadata into agent-run authority.
|
|
25
|
+
runtime: { sandbox: true },
|
|
26
|
+
},
|
|
18
27
|
},
|
|
19
28
|
createAdapter: context => new SandboxAdapter(context),
|
|
20
29
|
});
|
|
@@ -12,13 +12,22 @@ export type { SandboxEndpointOptions } from '../../src/endpoint.js';
|
|
|
12
12
|
|
|
13
13
|
export default defineAdapter<SandboxEndpointConfig>({
|
|
14
14
|
capabilities: ['inbound', 'outbound'],
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
profile: {
|
|
16
|
+
default: {
|
|
17
|
+
messaging: {
|
|
18
|
+
// Console UI 直连 URL 媒体、直接渲染 base64 内联媒体;path 由端点读盘
|
|
19
|
+
// 物化为 base64 内联(sandbox 无平台上传通道)。交互段由 Console 原生承载。
|
|
20
|
+
segments: {
|
|
21
|
+
html: 'direct',
|
|
22
|
+
markdown: 'native',
|
|
23
|
+
outboundMedia: ['url', 'base64', 'path'],
|
|
24
|
+
interactive: 'native',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
delivery: { send: true, proactive: true, spool: true },
|
|
28
|
+
// The authenticated local ingress: its configured owner may turn wire metadata into agent-run authority.
|
|
29
|
+
runtime: { sandbox: true },
|
|
30
|
+
},
|
|
22
31
|
},
|
|
23
32
|
createAdapter: context => new SandboxAdapter(context),
|
|
24
33
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-sandbox",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"description": "Zhin.js Sandbox adapter for Plugin Runtime (WebSocket /sandbox)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"lucide-react": "^0.525.0",
|
|
49
49
|
"react": "^19.2.8",
|
|
50
|
-
"@zhin.js/adapter": "1.1.
|
|
51
|
-
"@zhin.js/client": "1.1.
|
|
50
|
+
"@zhin.js/adapter": "1.1.28",
|
|
51
|
+
"@zhin.js/client": "1.1.24",
|
|
52
52
|
"@zhin.js/console-contract": "1.1.3",
|
|
53
|
-
"@zhin.js/core": "1.1.
|
|
54
|
-
"@zhin.js/feature-kit": "1.1.
|
|
55
|
-
"@zhin.js/host-http": "1.1.
|
|
56
|
-
"@zhin.js/im-contract": "1.1.
|
|
53
|
+
"@zhin.js/core": "1.1.56",
|
|
54
|
+
"@zhin.js/feature-kit": "1.1.12",
|
|
55
|
+
"@zhin.js/host-http": "1.1.14",
|
|
56
|
+
"@zhin.js/im-contract": "1.1.11",
|
|
57
57
|
"@zhin.js/logger": "1.1.2",
|
|
58
|
-
"@zhin.js/page": "1.1.
|
|
59
|
-
"@zhin.js/skill": "1.1.
|
|
58
|
+
"@zhin.js/page": "1.1.14",
|
|
59
|
+
"@zhin.js/skill": "1.1.13"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/react": "^19.2.18",
|
|
@@ -64,18 +64,18 @@
|
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
65
|
"vitest": "^4.1.10",
|
|
66
66
|
"ws": "^8.21.1",
|
|
67
|
-
"@zhin.js/pagemanager": "1.1.
|
|
68
|
-
"@zhin.js/runtime": "1.1.
|
|
69
|
-
"zhin.js": "1.1.
|
|
67
|
+
"@zhin.js/pagemanager": "1.1.21",
|
|
68
|
+
"@zhin.js/runtime": "1.1.18",
|
|
69
|
+
"zhin.js": "1.1.21"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^19.0.0",
|
|
73
|
-
"@zhin.js/adapter": "^1.1.
|
|
73
|
+
"@zhin.js/adapter": "^1.1.28",
|
|
74
74
|
"@zhin.js/console-contract": "^1.1.3",
|
|
75
|
-
"@zhin.js/core": "^1.1.
|
|
76
|
-
"@zhin.js/host-http": "^1.1.
|
|
77
|
-
"@zhin.js/page": "^1.1.
|
|
78
|
-
"zhin.js": "^1.1.
|
|
75
|
+
"@zhin.js/core": "^1.1.56",
|
|
76
|
+
"@zhin.js/host-http": "^1.1.14",
|
|
77
|
+
"@zhin.js/page": "^1.1.14",
|
|
78
|
+
"zhin.js": "^1.1.21"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"react": {
|
|
@@ -347,21 +347,7 @@ const RichTextEditor = forwardRef(({ locale = 'zh-CN', placeholder = sandboxText
|
|
|
347
347
|
replaceAtTrigger,
|
|
348
348
|
getContent
|
|
349
349
|
}));
|
|
350
|
-
return (_jsx("div", { ref: editorRef, contentEditable: true, suppressContentEditableWarning: true, onInput: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste, "data-placeholder": placeholder, className: "rich-text-editor", style: {
|
|
351
|
-
width: '100%',
|
|
352
|
-
minHeight,
|
|
353
|
-
maxHeight,
|
|
354
|
-
padding: '0.5rem 0.75rem',
|
|
355
|
-
border: '1px solid var(--gray-6)',
|
|
356
|
-
borderRadius: '6px',
|
|
357
|
-
backgroundColor: 'var(--gray-1)',
|
|
358
|
-
fontSize: 'var(--font-size-2)',
|
|
359
|
-
outline: 'none',
|
|
360
|
-
overflowY: 'auto',
|
|
361
|
-
lineHeight: '1.5',
|
|
362
|
-
wordWrap: 'break-word',
|
|
363
|
-
color: 'var(--gray-12)'
|
|
364
|
-
} }));
|
|
350
|
+
return (_jsx("div", { ref: editorRef, contentEditable: true, role: "textbox", "aria-label": placeholder, "aria-multiline": "true", suppressContentEditableWarning: true, onInput: handleChange, onKeyDown: handleKeyDown, onPaste: handlePaste, "data-placeholder": placeholder, className: "rich-text-editor", style: { width: '100%', minHeight, maxHeight } }));
|
|
365
351
|
});
|
|
366
352
|
RichTextEditor.displayName = 'RichTextEditor';
|
|
367
353
|
export default RichTextEditor;
|
|
@@ -412,27 +412,16 @@ const RichTextEditor = forwardRef<RichTextEditorRef, RichTextEditorProps>(
|
|
|
412
412
|
<div
|
|
413
413
|
ref={editorRef}
|
|
414
414
|
contentEditable
|
|
415
|
+
role="textbox"
|
|
416
|
+
aria-label={placeholder}
|
|
417
|
+
aria-multiline="true"
|
|
415
418
|
suppressContentEditableWarning
|
|
416
419
|
onInput={handleChange}
|
|
417
420
|
onKeyDown={handleKeyDown}
|
|
418
421
|
onPaste={handlePaste}
|
|
419
422
|
data-placeholder={placeholder}
|
|
420
423
|
className="rich-text-editor"
|
|
421
|
-
style={{
|
|
422
|
-
width: '100%',
|
|
423
|
-
minHeight,
|
|
424
|
-
maxHeight,
|
|
425
|
-
padding: '0.5rem 0.75rem',
|
|
426
|
-
border: '1px solid var(--gray-6)',
|
|
427
|
-
borderRadius: '6px',
|
|
428
|
-
backgroundColor: 'var(--gray-1)',
|
|
429
|
-
fontSize: 'var(--font-size-2)',
|
|
430
|
-
outline: 'none',
|
|
431
|
-
overflowY: 'auto',
|
|
432
|
-
lineHeight: '1.5',
|
|
433
|
-
wordWrap: 'break-word',
|
|
434
|
-
color: 'var(--gray-12)'
|
|
435
|
-
}}
|
|
424
|
+
style={{ width: '100%', minHeight, maxHeight }}
|
|
436
425
|
/>
|
|
437
426
|
)
|
|
438
427
|
}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { sandboxText } from './messages.js';
|
|
4
4
|
import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
5
|
-
import { cn, CodeBlock, MarkdownContent, resolveMediaSrc, pickMediaRawUrl, } from '@zhin.js/client';
|
|
5
|
+
import { cn, adapterConsoleStyles, CodeBlock, MarkdownContent, resolveMediaSrc, pickMediaRawUrl, } from '@zhin.js/client';
|
|
6
6
|
import { buildSandboxWebSocketUrl, captureSandboxRequestContext, createSandboxMessageId, submitSandboxFrame, SANDBOX_SCOPED_PROTOCOL } from './sandboxTransport';
|
|
7
7
|
import { createWorkspaceDirectoryController } from './workspaceDirectoryState.js';
|
|
8
8
|
import { User, Bot, Users, Trash2, Send, Hash, MessageSquare, Wifi, WifiOff, Smile, Image, X, Check, Info, Search, Video, Music, Plus, PanelRight, ExternalLink, RefreshCw, Sparkles, Activity, Wrench, Coins, CircleAlert, Gauge, SlidersHorizontal, FolderOpen, ShieldCheck, Network, Square, RotateCcw, FileDiff, Terminal, FlaskConical, ChevronDown, FileDown, ListChecks, } from 'lucide-react';
|
|
9
9
|
import RichTextEditor, {} from './RichTextEditor';
|
|
10
10
|
import HtmlMessage from './HtmlMessage.js';
|
|
11
|
+
import { sandboxStyles } from './styles.js';
|
|
11
12
|
import ConversationRecoveryPanel from './ConversationRecoveryPanel.js';
|
|
12
13
|
import { useSandboxHistory } from './useSandboxHistory.js';
|
|
13
14
|
import { agentSessionsPath, buildAgentRunReport, buildSandboxSessionKey, cancelAgentTask, deriveAgentRunSteps, deriveTaskRuns, deriveWorkbenchArtifacts, fetchAgentTrace, loadCachedAgentTrace, mergeTraceSnapshot, presentTraceEvent, summarizeTrace, saveCachedAgentTrace, } from './agentTrace.js';
|
|
@@ -754,7 +755,7 @@ export default function Sandbox(props = {}) {
|
|
|
754
755
|
};
|
|
755
756
|
const inlineRunCard = currentTask ? (_jsxs("article", { className: cn('agent-playground-inline-run', `is-${currentTask.status}`), "aria-live": currentTask.status === 'running' ? 'polite' : undefined, children: [_jsx("span", { className: "agent-playground-inline-run-rail", "aria-hidden": "true" }), _jsxs("div", { className: "agent-playground-inline-run-head", children: [_jsx("span", { className: "agent-playground-inline-run-icon", children: _jsx(ListChecks, { size: 17 }) }), _jsxs("div", { className: "agent-playground-inline-run-copy", children: [_jsx("span", { children: currentTask.status === 'running' ? 'Live agent run' : 'Agent run summary' }), _jsx("h3", { children: taskStatusLabel(currentTask.status, locale) }), currentTaskMessage && _jsx("p", { children: messageText(currentTaskMessage.content) })] }), _jsxs("div", { className: "agent-playground-inline-run-actions", children: [currentTask.status === 'running' ? (_jsxs("button", { type: "button", className: "is-stop", onClick: () => void stopActiveTask(), disabled: stoppingTask, children: [_jsx(Square, { size: 12 }), stoppingTask ? sandboxText(locale, "停止中") : sandboxText(locale, "停止")] })) : currentTaskMessage ? (_jsxs("button", { type: "button", onClick: retryCurrentTask, children: [_jsx(RotateCcw, { size: 13 }), sandboxText(locale, "重试")] })) : null, _jsxs("button", { type: "button", onClick: exportCurrentRun, title: sandboxText(locale, "导出 Markdown 运行报告"), children: [_jsx(FileDown, { size: 13 }), sandboxText(locale, "导出")] })] })] }), _jsxs("dl", { className: "agent-playground-inline-run-metrics", children: [_jsxs("div", { children: [_jsx("dt", { children: sandboxText(locale, "耗时") }), _jsx("dd", { children: currentTask.durationMs === undefined ? sandboxText(locale, "进行中") : formatDuration(currentTask.durationMs, locale) })] }), _jsxs("div", { children: [_jsx("dt", { children: sandboxText(locale, "步骤") }), _jsx("dd", { children: currentRunSteps.length })] }), _jsxs("div", { children: [_jsx("dt", { children: sandboxText(locale, "工具") }), _jsx("dd", { children: currentTask.toolCount })] }), _jsxs("div", { children: [_jsx("dt", { children: "Token" }), _jsx("dd", { children: currentTask.tokenCount.toLocaleString(locale) })] }), _jsxs("div", { className: cn(currentTask.problemCount > 0 && 'has-problem'), children: [_jsx("dt", { children: sandboxText(locale, "异常") }), _jsx("dd", { children: currentTask.problemCount })] })] }), inlineRunExpanded && (currentRunSteps.length > 0 ? (_jsx("ol", { className: "agent-playground-inline-run-steps", children: currentRunSteps.map((step) => (_jsxs("li", { className: cn(`is-${step.status}`), children: [_jsx("i", { "aria-hidden": "true" }), _jsxs("div", { children: [_jsx("strong", { children: step.title }), step.detail && _jsx("small", { children: step.detail })] }), _jsx("span", { children: step.durationMs === undefined ? runStepStatusLabel(step.status, locale) : formatDuration(step.durationMs, locale) })] }, step.id))) })) : _jsx("div", { className: "agent-playground-inline-run-empty", children: sandboxText(locale, "正在等待第一条运行事件…") })), _jsxs("footer", { children: [_jsxs("button", { type: "button", "aria-expanded": inlineRunExpanded, onClick: () => setInlineRunExpanded((expanded) => !expanded), children: [_jsx(ChevronDown, { size: 13 }), inlineRunExpanded ? sandboxText(locale, "收起步骤") : sandboxText(locale, "查看 {0} 个步骤", [currentRunSteps.length])] }), _jsxs("button", { type: "button", onClick: () => { setInspectorView(currentRunArtifacts.length > 0 ? 'artifacts' : 'runs'); setShowInspector(true); }, children: [currentRunArtifacts.length > 0 ? sandboxText(locale, "{0} 个变更与产物", [currentRunArtifacts.length]) : sandboxText(locale, "打开运行检查器"), _jsx(PanelRight, { size: 13 })] })] })] })) : null;
|
|
756
757
|
const recoveryConnectionId = connectionRef.current.connectionId;
|
|
757
|
-
return (_jsxs("section", { className: cn("agent-playground-shell", showInspector && "has-inspector"), children: [_jsxs("div", { className: "agent-playground-mobilebar", children: [_jsxs("button", { type: "button", "aria-expanded": showChannelList, onClick: () => setShowChannelList(!showChannelList), children: [_jsx(MessageSquare, { size: 17 }), sandboxText(locale, "会话列表")] }), _jsx("strong", { children: sandboxText(locale, "会话") }), _jsxs("button", { type: "button", "aria-expanded": showInspector, "aria-controls": "sandbox-run-inspector", onClick: () => setShowInspector(!showInspector), children: [_jsx(PanelRight, { size: 17 }), sandboxText(locale, "检查器")] })] }), _jsxs("nav", { className: cn("channel-sidebar agent-playground-sessions", showChannelList && "show"), "aria-label": sandboxText(locale, "会话列表"), children: [_jsx("div", { className: "agent-playground-brand", children: _jsxs("div", { className: "flex justify-between items-center", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "agent-playground-mark", children: _jsx(Sparkles, { size: 16 }) }), _jsxs("div", { children: [_jsx("h2", { children: sandboxText(locale, "会话") }), _jsx("small", { children: "Conversations" })] })] }), _jsx("span", { className: cn("agent-playground-connection", connected && "is-online"), title: connected ? sandboxText(locale, "Sandbox WebSocket 已连接") : sandboxText(locale, "正在重连 Sandbox WebSocket"), children: connected ? _jsx(Wifi, { size: 12 }) : _jsx(WifiOff, { size: 12 }) })] }) }), _jsxs("div", { className: "agent-playground-section-label", children: [_jsx("span", { children: sandboxText(locale, "会话列表") }), _jsx("span", { children: channels.length }), _jsx("button", { type: "button", disabled: directoryStatus.mode === 'loading', "aria-label": sandboxText(locale, "刷新会话目录"), onClick: () => void directoryControllerRef.current?.refresh(), children: _jsx(RefreshCw, { size: 13 }) })] }), _jsx("div", { className: "agent-playground-session-list", children: channels.map((channel) => {
|
|
758
|
+
return (_jsxs("section", { className: cn("zhin-console-surface zhin-sandbox agent-playground-shell", showInspector && "has-inspector"), children: [_jsxs("style", { children: [adapterConsoleStyles, sandboxStyles] }), _jsxs("div", { className: "agent-playground-mobilebar", children: [_jsxs("button", { type: "button", "aria-expanded": showChannelList, onClick: () => setShowChannelList(!showChannelList), children: [_jsx(MessageSquare, { size: 17 }), sandboxText(locale, "会话列表")] }), _jsx("strong", { children: sandboxText(locale, "会话") }), _jsxs("button", { type: "button", "aria-expanded": showInspector, "aria-controls": "sandbox-run-inspector", onClick: () => setShowInspector(!showInspector), children: [_jsx(PanelRight, { size: 17 }), sandboxText(locale, "检查器")] })] }), _jsxs("nav", { className: cn("channel-sidebar agent-playground-sessions", showChannelList && "show"), "aria-label": sandboxText(locale, "会话列表"), children: [_jsx("div", { className: "agent-playground-brand", children: _jsxs("div", { className: "flex justify-between items-center", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "agent-playground-mark", children: _jsx(Sparkles, { size: 16 }) }), _jsxs("div", { children: [_jsx("h2", { children: sandboxText(locale, "会话") }), _jsx("small", { children: "Conversations" })] })] }), _jsx("span", { className: cn("agent-playground-connection", connected && "is-online"), title: connected ? sandboxText(locale, "Sandbox WebSocket 已连接") : sandboxText(locale, "正在重连 Sandbox WebSocket"), children: connected ? _jsx(Wifi, { size: 12 }) : _jsx(WifiOff, { size: 12 }) })] }) }), _jsxs("div", { className: "agent-playground-section-label", children: [_jsx("span", { children: sandboxText(locale, "会话列表") }), _jsx("span", { children: channels.length }), _jsx("button", { type: "button", disabled: directoryStatus.mode === 'loading', "aria-label": sandboxText(locale, "刷新会话目录"), onClick: () => void directoryControllerRef.current?.refresh(), children: _jsx(RefreshCw, { size: 13 }) })] }), _jsx("div", { className: "agent-playground-session-list", children: channels.map((channel) => {
|
|
758
759
|
const isActive = activeChannel.id === channel.id && activeChannel.type === channel.type;
|
|
759
760
|
return (_jsxs("button", { type: "button", disabled: directoryStatus.mode === 'loading', "aria-current": isActive ? 'page' : undefined, className: cn("agent-playground-session", isActive && "active"), onClick: () => switchChannel(channel), children: [_jsx("span", { className: "agent-playground-session-icon", children: getChannelIcon(channel.type) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("div", { className: "text-sm font-medium truncate", children: channel.name }), _jsx("div", { className: "text-xs text-muted-foreground", children: channel.type === 'private' ? sandboxText(locale, "单用户作用域") : channel.type === 'group' ? sandboxText(locale, "群组作用域") : sandboxText(locale, "频道作用域") })] }), channel.unread > 0 && _jsx("span", { className: "inline-flex items-center justify-center h-5 min-w-5 rounded-full bg-destructive text-destructive-foreground text-[10px] font-medium px-1", children: channel.unread })] }, `${channel.type}:${channel.id}`));
|
|
760
761
|
}) }), _jsx("div", { className: "agent-playground-new-session", children: showNewSession ? (_jsxs("div", { className: "agent-playground-new-form", children: [_jsx("input", { value: newSessionName, onChange: (event) => setNewSessionName(event.target.value), onKeyDown: (event) => { if (event.key === 'Enter')
|
|
@@ -2,6 +2,7 @@ import { sandboxText, type SandboxLocale } from './messages.js';
|
|
|
2
2
|
import React, { useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
cn,
|
|
5
|
+
adapterConsoleStyles,
|
|
5
6
|
CodeBlock,
|
|
6
7
|
MarkdownContent,
|
|
7
8
|
resolveMediaSrc,
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
} from 'lucide-react';
|
|
23
24
|
import RichTextEditor, { type RichTextEditorRef } from './RichTextEditor';
|
|
24
25
|
import HtmlMessage from './HtmlMessage.js';
|
|
26
|
+
import { sandboxStyles } from './styles.js';
|
|
25
27
|
import ConversationRecoveryPanel from './ConversationRecoveryPanel.js';
|
|
26
28
|
import { useSandboxHistory } from './useSandboxHistory.js';
|
|
27
29
|
import {
|
|
@@ -889,7 +891,8 @@ export default function Sandbox(props: SandboxPageProps = {}) {
|
|
|
889
891
|
|
|
890
892
|
const recoveryConnectionId = connectionRef.current.connectionId
|
|
891
893
|
return (
|
|
892
|
-
<section className={cn("agent-playground-shell", showInspector && "has-inspector")}>
|
|
894
|
+
<section className={cn("zhin-console-surface zhin-sandbox agent-playground-shell", showInspector && "has-inspector")}>
|
|
895
|
+
<style>{adapterConsoleStyles}{sandboxStyles}</style>
|
|
893
896
|
<div className="agent-playground-mobilebar">
|
|
894
897
|
<button type="button" aria-expanded={showChannelList} onClick={() => setShowChannelList(!showChannelList)}><MessageSquare size={17} />{sandboxText(locale, "会话列表")}</button>
|
|
895
898
|
<strong>{sandboxText(locale, "会话")}</strong>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// Generated by build-plugin-runtime-entries.mjs. Do not edit.
|
|
2
|
+
/** The adapter owns its workbench presentation; no styles from a particular Console shell are required. */
|
|
3
|
+
export const sandboxStyles = `
|
|
4
|
+
.zhin-sandbox.agent-playground-shell { position: relative; display: grid; grid-template-columns: 232px minmax(0,1fr); height: calc(100dvh - 72px); min-height: 520px; overflow: hidden; border: 1px solid var(--ac-line); border-radius: 14px; background: var(--ac-panel); }
|
|
5
|
+
.zhin-sandbox [hidden], .zhin-sandbox .hidden { display: none !important; }
|
|
6
|
+
.zhin-sandbox button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid var(--ac-line); border-radius: 8px; min-height: 34px; padding: 6px 10px; color: var(--ac-ink); background: var(--ac-panel); cursor: pointer; font-size: 12px; line-height: 1.4; }
|
|
7
|
+
.zhin-sandbox button:hover:not(:disabled) { background: var(--ac-soft); }
|
|
8
|
+
.zhin-sandbox button:disabled { opacity: .45; cursor: not-allowed; }
|
|
9
|
+
.zhin-sandbox button.primary { background: var(--ac-primary); color: var(--ac-panel); border-color: var(--ac-primary); }
|
|
10
|
+
.zhin-sandbox button.danger, .zhin-sandbox .agent-playground-stop { color: var(--ac-bad); background: var(--ac-bad-bg); border-color: transparent; }
|
|
11
|
+
.zhin-sandbox .agent-playground-mobilebar { display: none; }
|
|
12
|
+
.zhin-sandbox .agent-playground-sessions { min-width: 0; display: flex; flex-direction: column; background: var(--ac-canvas); border-right: 1px solid var(--ac-line); overflow: hidden; }
|
|
13
|
+
.zhin-sandbox .agent-playground-brand { padding: 24px 18px; }
|
|
14
|
+
.zhin-sandbox .agent-playground-brand > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
15
|
+
.zhin-sandbox .agent-playground-brand > div > div { display: flex; align-items: center; gap: 10px; }
|
|
16
|
+
.zhin-sandbox .agent-playground-brand h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
|
|
17
|
+
.zhin-sandbox .agent-playground-brand small { font-size: 11px; color: var(--ac-muted); }
|
|
18
|
+
.zhin-sandbox .agent-playground-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ac-ink); color: var(--ac-panel); }
|
|
19
|
+
.zhin-sandbox .agent-playground-connection { display: grid; place-items: center; color: var(--ac-warn); }
|
|
20
|
+
.zhin-sandbox .agent-playground-connection.is-online, .zhin-sandbox .is-online { color: var(--ac-ok); }
|
|
21
|
+
.zhin-sandbox .agent-playground-section-label { display: flex; align-items: center; gap: 8px; padding: 0 18px 10px; font-size: 12px; color: var(--ac-muted); }
|
|
22
|
+
.zhin-sandbox .agent-playground-section-label button { margin-left: auto; min-height: 28px; padding: 4px; background: transparent; border-color: transparent; }
|
|
23
|
+
.zhin-sandbox .agent-playground-session-list { flex: 1; min-height: 0; overflow: auto; padding: 0 10px; }
|
|
24
|
+
.zhin-sandbox .agent-playground-session { display: flex; justify-content: flex-start; width: 100%; gap: 10px; padding: 12px 10px; border: 1px solid transparent; margin-bottom: 4px; background: transparent; text-align: left; }
|
|
25
|
+
.zhin-sandbox .agent-playground-session.active { background: var(--ac-panel); border-color: var(--ac-line); box-shadow: 0 2px 3px #19283e05; }
|
|
26
|
+
.zhin-sandbox .agent-playground-session-icon { color: var(--ac-muted); }
|
|
27
|
+
.zhin-sandbox .agent-playground-session.active .agent-playground-session-icon { color: var(--ac-primary); }
|
|
28
|
+
.zhin-sandbox .agent-playground-session > div { flex: 1; min-width: 0; }
|
|
29
|
+
.zhin-sandbox .agent-playground-session > div > div:first-child { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
30
|
+
.zhin-sandbox .agent-playground-session > div > div:last-child { font-size: 11px; color: var(--ac-muted); margin-top: 4px; }
|
|
31
|
+
.zhin-sandbox .agent-playground-new-session { padding: 16px 14px; }
|
|
32
|
+
.zhin-sandbox .agent-playground-add { width: 100%; background: var(--ac-panel); }
|
|
33
|
+
.zhin-sandbox .agent-playground-new-form { display: grid; gap: 10px; }
|
|
34
|
+
.zhin-sandbox .agent-playground-scope-picker, .zhin-sandbox .agent-playground-new-actions { display: flex; gap: 5px; }
|
|
35
|
+
.zhin-sandbox .agent-playground-scope-picker button { flex: 1; font-size: 11px; padding: 6px; }
|
|
36
|
+
.zhin-sandbox .agent-playground-scope-picker button.active { border-color: var(--ac-primary); color: var(--ac-primary); background: var(--ac-tint); }
|
|
37
|
+
.zhin-sandbox .agent-playground-new-actions { justify-content: flex-end; }
|
|
38
|
+
.zhin-sandbox .agent-playground-endpoint { padding: 14px 18px; border-top: 1px solid var(--ac-line); display: grid; gap: 3px; }
|
|
39
|
+
.zhin-sandbox .agent-playground-endpoint span { font-size: 11px; color: var(--ac-muted); }
|
|
40
|
+
.zhin-sandbox .agent-playground-endpoint strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
|
|
41
|
+
.zhin-sandbox .agent-playground-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
|
|
42
|
+
.zhin-sandbox .agent-playground-runbar { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ac-line); }
|
|
43
|
+
.zhin-sandbox .agent-playground-run-identity { display: flex; gap: 10px; align-items: center; min-width: 0; }
|
|
44
|
+
.zhin-sandbox .agent-playground-run-identity > div { min-width: 0; }
|
|
45
|
+
.zhin-sandbox .agent-playground-run-icon { color: var(--ac-primary); }
|
|
46
|
+
.zhin-sandbox .agent-playground-run-title h1 { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
47
|
+
.zhin-sandbox .agent-playground-run-title span { font-size: 11px; color: var(--ac-muted); }
|
|
48
|
+
.zhin-sandbox .agent-playground-run-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
|
|
49
|
+
.zhin-sandbox .agent-playground-run-actions > a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px; text-decoration: none; }
|
|
50
|
+
.zhin-sandbox .agent-playground-run-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ac-muted); font-size: 11px; }
|
|
51
|
+
.zhin-sandbox .agent-playground-run-state.is-running { color: var(--ac-primary); }
|
|
52
|
+
.zhin-sandbox .agent-playground-run-state.has-problem { color: var(--ac-bad); }
|
|
53
|
+
.zhin-sandbox .agent-playground-confirm { display: flex; align-items: center; gap: 10px; background: var(--ac-warn-bg); color: var(--ac-warn); padding: 12px 20px; border-bottom: 1px solid var(--ac-line); font-size: 12px; }
|
|
54
|
+
.zhin-sandbox .agent-playground-confirm > div { flex: 1; display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
|
|
55
|
+
.zhin-sandbox .agent-playground-run-settings { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 24px; background: var(--ac-canvas); border-bottom: 1px solid var(--ac-line); }
|
|
56
|
+
.zhin-sandbox .agent-playground-run-settings label { display: grid; gap: 5px; flex: 1; min-width: 140px; }
|
|
57
|
+
.zhin-sandbox .agent-playground-run-settings label > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ac-muted); }
|
|
58
|
+
.zhin-sandbox .agent-playground-run-settings input, .zhin-sandbox .agent-playground-run-settings select { font-size: 12px; padding: 7px 9px; }
|
|
59
|
+
.zhin-sandbox .agent-playground-run-settings .agent-playground-directory-field { flex-basis: 100%; }
|
|
60
|
+
.zhin-sandbox .agent-playground-run-settings .agent-playground-network-toggle { display: flex; align-items: center; gap: 10px; flex: none; }
|
|
61
|
+
.zhin-sandbox .agent-playground-network-toggle i { display: none; }
|
|
62
|
+
.zhin-sandbox .agent-playground-run-settings p { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--ac-warn); flex-basis: 100%; }
|
|
63
|
+
.zhin-sandbox .agent-playground-conversation { flex: 1; display: flex; min-height: 0; overflow: hidden; }
|
|
64
|
+
.zhin-sandbox .agent-playground-message-scroll { flex: 1; min-width: 0; overflow-y: auto; padding: 28px 24px; scrollbar-gutter: stable; }
|
|
65
|
+
.zhin-sandbox .agent-playground-empty { max-width: 560px; margin: clamp(24px, 8vh, 100px) auto 32px; text-align: center; }
|
|
66
|
+
.zhin-sandbox .agent-playground-empty-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 18px; background: var(--ac-tint); color: var(--ac-primary); }
|
|
67
|
+
.zhin-sandbox .agent-playground-empty h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 650; letter-spacing: -.025em; margin-bottom: 10px; }
|
|
68
|
+
.zhin-sandbox .agent-playground-empty p { color: var(--ac-muted); font-size: 13px; line-height: 1.8; max-width: 48ch; margin: 0 auto; }
|
|
69
|
+
.zhin-sandbox .agent-playground-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
|
|
70
|
+
.zhin-sandbox .agent-playground-prompts button { padding: 9px 12px; }
|
|
71
|
+
.zhin-sandbox .agent-playground-message-list { display: grid; gap: 24px; max-width: 780px; margin: 0 auto; }
|
|
72
|
+
.zhin-sandbox .agent-playground-message { display: flex; align-items: flex-start; gap: 12px; }
|
|
73
|
+
.zhin-sandbox .agent-playground-message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ac-tint); color: var(--ac-primary); flex-shrink: 0; }
|
|
74
|
+
.zhin-sandbox .agent-playground-message.is-user .agent-playground-message-avatar { background: var(--ac-soft); color: var(--ac-muted); }
|
|
75
|
+
.zhin-sandbox .agent-playground-message-main { flex: 1; min-width: 0; }
|
|
76
|
+
.zhin-sandbox .agent-playground-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
|
|
77
|
+
.zhin-sandbox .agent-playground-message-meta strong { font-size: 12px; font-weight: 650; }
|
|
78
|
+
.zhin-sandbox .agent-playground-message-meta time { font-size: 10px; color: var(--ac-muted); }
|
|
79
|
+
.zhin-sandbox .agent-playground-message-meta span { color: var(--ac-warn); font-size: 10px; }
|
|
80
|
+
.zhin-sandbox .agent-playground-message-content { line-height: 1.8; overflow-wrap: anywhere; }
|
|
81
|
+
.zhin-sandbox .agent-playground-message-content img { max-width: 100%; border-radius: 10px; }
|
|
82
|
+
.zhin-sandbox .agent-playground-message.is-user .agent-playground-message-content { background: var(--ac-canvas); border-radius: 10px; padding: 12px 16px; }
|
|
83
|
+
.zhin-sandbox .agent-playground-message.is-approval { padding: 16px; background: var(--ac-warn-bg); border: 1px solid var(--ac-line); border-radius: 10px; }
|
|
84
|
+
.zhin-sandbox .agent-playground-composer { padding: 16px 24px; border-top: 1px solid var(--ac-line); display: grid; gap: 12px; background: var(--ac-panel); }
|
|
85
|
+
.zhin-sandbox .agent-playground-composer > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
|
|
86
|
+
.zhin-sandbox .agent-playground-composer > div:first-child > div.flex-1 { flex: 1; }
|
|
87
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) { display: flex; align-items: flex-end; gap: 10px; }
|
|
88
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > div { flex: 1; min-width: 0; }
|
|
89
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > button { min-height: 42px; padding: 10px 16px; background: var(--ac-primary); border-color: var(--ac-primary); color: var(--ac-panel); }
|
|
90
|
+
.zhin-sandbox .agent-playground-composer > div:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 10px; color: var(--ac-muted); }
|
|
91
|
+
.zhin-sandbox .agent-playground-composer > div:last-child span { padding: 1px 4px; border: 1px solid var(--ac-line); border-radius: 4px; }
|
|
92
|
+
.zhin-sandbox [contenteditable="true"] { padding: 12px 14px; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; line-height: 1.6; overflow-y: auto; outline: none; }
|
|
93
|
+
.zhin-sandbox [contenteditable="true"]:focus-visible { border-color: var(--ac-primary); outline: 2px solid var(--ac-primary); outline-offset: 1px; }
|
|
94
|
+
.zhin-sandbox [contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--ac-muted); pointer-events: none; }
|
|
95
|
+
.zhin-sandbox .editor-face { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
|
|
96
|
+
.zhin-sandbox .editor-image { max-height: 100px; max-width: 100%; display: inline-block; }
|
|
97
|
+
.zhin-sandbox .sandbox-composer-tabs { display: flex; gap: 3px; padding: 3px; background: var(--ac-soft); border-radius: 8px; }
|
|
98
|
+
.zhin-sandbox .sandbox-composer-tabs button { border-color: transparent; min-height: 26px; background: transparent; }
|
|
99
|
+
.zhin-sandbox .sandbox-composer-tabs button.active { color: var(--ac-primary); background: var(--ac-panel); }
|
|
100
|
+
.zhin-sandbox .sandbox-markdown-preview { max-height: 200px; min-height: 44px; padding: 12px; overflow: auto; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; }
|
|
101
|
+
.zhin-sandbox .sandbox-markdown-preview-empty { color: var(--ac-muted); }
|
|
102
|
+
.zhin-sandbox .agent-playground-inspector { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 90%); z-index: 30; display: flex; flex-direction: column; background: var(--ac-canvas); border-left: 1px solid var(--ac-line); overflow: auto; }
|
|
103
|
+
.zhin-sandbox .agent-playground-inspector-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--ac-line); }
|
|
104
|
+
.zhin-sandbox .agent-playground-inspector-head > div:last-child { display: flex; gap: 6px; }
|
|
105
|
+
.zhin-sandbox .agent-playground-inspector-head span { font-size: 11px; color: var(--ac-muted); }
|
|
106
|
+
.zhin-sandbox .agent-playground-inspector-head h2 { font-size: 17px; font-weight: 650; }
|
|
107
|
+
.zhin-sandbox .agent-playground-inspector-tabs { display: flex; gap: 6px; padding: 14px 16px; }
|
|
108
|
+
.zhin-sandbox .agent-playground-inspector-tabs button { flex: 1; background: transparent; border-color: transparent; }
|
|
109
|
+
.zhin-sandbox .agent-playground-inspector-tabs button.active { background: var(--ac-panel); border-color: var(--ac-line); color: var(--ac-primary); }
|
|
110
|
+
.zhin-sandbox .agent-playground-inspector-section { padding: 18px 20px; border-bottom: 1px solid var(--ac-line); }
|
|
111
|
+
.zhin-sandbox .agent-playground-inspector-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 650; }
|
|
112
|
+
.zhin-sandbox .agent-playground-inspector-title small { color: var(--ac-muted); font-weight: 400; font-size: 10px; }
|
|
113
|
+
.zhin-sandbox .agent-playground-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
|
|
114
|
+
.zhin-sandbox .agent-playground-metrics > div { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 4px 8px; padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
|
|
115
|
+
.zhin-sandbox .agent-playground-metrics svg { width: 15px; height: 15px; color: var(--ac-muted); }
|
|
116
|
+
.zhin-sandbox .agent-playground-metrics strong { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
|
|
117
|
+
.zhin-sandbox .agent-playground-metrics span { grid-column: 2; font-size: 10px; color: var(--ac-muted); }
|
|
118
|
+
.zhin-sandbox .agent-playground-metrics .has-problem svg { color: var(--ac-bad); }
|
|
119
|
+
.zhin-sandbox .agent-playground-context-list { display: grid; gap: 8px; font-size: 11px; }
|
|
120
|
+
.zhin-sandbox .agent-playground-context-list > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px; }
|
|
121
|
+
.zhin-sandbox .agent-playground-context-list dt { color: var(--ac-muted); }
|
|
122
|
+
.zhin-sandbox .agent-playground-context-list dd { overflow-wrap: anywhere; }
|
|
123
|
+
.zhin-sandbox .agent-playground-trace-list { display: grid; gap: 14px; }
|
|
124
|
+
.zhin-sandbox .agent-playground-trace-item { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; }
|
|
125
|
+
.zhin-sandbox .agent-playground-trace-item > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
|
|
126
|
+
.zhin-sandbox .agent-playground-trace-item strong { font-weight: 600; }
|
|
127
|
+
.zhin-sandbox .agent-playground-trace-item small, .zhin-sandbox .agent-playground-trace-item time { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
128
|
+
.zhin-sandbox .agent-playground-trace-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; margin-top: 6px; }
|
|
129
|
+
.zhin-sandbox .agent-playground-trace-item.is-error .agent-playground-trace-dot { background: var(--ac-bad); }
|
|
130
|
+
.zhin-sandbox .agent-playground-artifact-empty, .zhin-sandbox .agent-playground-trace-empty, .zhin-sandbox .agent-playground-trace-notice { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--ac-muted); padding: 12px 0; }
|
|
131
|
+
.zhin-sandbox .agent-playground-trace-notice { color: var(--ac-bad); }
|
|
132
|
+
.zhin-sandbox .agent-playground-task-list, .zhin-sandbox .agent-playground-artifact-list { display: grid; gap: 8px; }
|
|
133
|
+
.zhin-sandbox .agent-playground-task-list article { padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
|
|
134
|
+
.zhin-sandbox .agent-playground-task-list article > div { display: flex; justify-content: space-between; font-size: 11px; }
|
|
135
|
+
.zhin-sandbox .agent-playground-task-list code { color: var(--ac-muted); font-size: 10px; }
|
|
136
|
+
.zhin-sandbox .agent-playground-task-list dl { display: flex; gap: 14px; margin-top: 8px; font-size: 10px; }
|
|
137
|
+
.zhin-sandbox .agent-playground-task-list dt { color: var(--ac-muted); }
|
|
138
|
+
.zhin-sandbox .agent-playground-artifact-list article { border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; overflow: hidden; }
|
|
139
|
+
.zhin-sandbox .agent-playground-artifact-list article > button { width: 100%; border: 0; border-radius: 0; padding: 12px; text-align: left; }
|
|
140
|
+
.zhin-sandbox .agent-playground-artifact-list article > button > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
|
|
141
|
+
.zhin-sandbox .agent-playground-artifact-list small { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
142
|
+
.zhin-sandbox .agent-playground-artifact-list em { font-style: normal; color: var(--ac-muted); font-size: 10px; }
|
|
143
|
+
.zhin-sandbox .agent-playground-artifact-detail { padding: 12px; font-size: 11px; display: grid; gap: 8px; }
|
|
144
|
+
.zhin-sandbox .agent-playground-artifact-detail pre { max-height: 320px; overflow: auto; padding: 10px; background: var(--ac-canvas); border-radius: 6px; }
|
|
145
|
+
.zhin-sandbox .agent-playground-artifact-detail footer { display: flex; justify-content: space-between; color: var(--ac-muted); }
|
|
146
|
+
.zhin-sandbox .agent-playground-studio-link { display: grid; gap: 6px; padding: 18px 20px; font-size: 12px; margin-top: auto; border-top: 1px solid var(--ac-line); text-decoration: none; }
|
|
147
|
+
.zhin-sandbox .agent-playground-studio-link span { display: flex; gap: 7px; align-items: center; }
|
|
148
|
+
.zhin-sandbox .agent-playground-studio-link code { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
149
|
+
.zhin-sandbox .agent-playground-inspector-overlay, .zhin-sandbox .channel-overlay { display: none; }
|
|
150
|
+
.zhin-sandbox .agent-playground-inline-run { border: 1px solid var(--ac-line); border-radius: 10px; padding: 16px; background: var(--ac-canvas); }
|
|
151
|
+
.zhin-sandbox .agent-playground-inline-run-head { display: flex; align-items: flex-start; gap: 10px; }
|
|
152
|
+
.zhin-sandbox .agent-playground-inline-run-icon { color: var(--ac-muted); padding-top: 4px; }
|
|
153
|
+
.zhin-sandbox .agent-playground-inline-run-copy { flex: 1; min-width: 0; }
|
|
154
|
+
.zhin-sandbox .agent-playground-inline-run-copy > span { font-size: 10px; color: var(--ac-muted); }
|
|
155
|
+
.zhin-sandbox .agent-playground-inline-run-copy h3 { font-size: 14px; font-weight: 600; }
|
|
156
|
+
.zhin-sandbox .agent-playground-inline-run-copy p { font-size: 12px; color: var(--ac-muted); overflow-wrap: anywhere; margin-top: 4px; }
|
|
157
|
+
.zhin-sandbox .agent-playground-inline-run-actions { display: flex; gap: 6px; }
|
|
158
|
+
.zhin-sandbox .agent-playground-inline-run-metrics { display: flex; flex-wrap: wrap; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--ac-line); font-variant-numeric: tabular-nums; }
|
|
159
|
+
.zhin-sandbox .agent-playground-inline-run-metrics dt { font-size: 10px; color: var(--ac-muted); }
|
|
160
|
+
.zhin-sandbox .agent-playground-inline-run-metrics dd { font-size: 13px; font-weight: 600; }
|
|
161
|
+
.zhin-sandbox .agent-playground-inline-run-steps { padding: 0; list-style: none; margin: 16px 0; display: grid; gap: 12px; }
|
|
162
|
+
.zhin-sandbox .agent-playground-inline-run-steps li { display: flex; align-items: flex-start; gap: 8px; }
|
|
163
|
+
.zhin-sandbox .agent-playground-inline-run-steps li > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
|
|
164
|
+
.zhin-sandbox .agent-playground-inline-run-steps strong { font-size: 12px; font-weight: 600; }
|
|
165
|
+
.zhin-sandbox .agent-playground-inline-run-steps small, .zhin-sandbox .agent-playground-inline-run-steps li > span { font-size: 10px; color: var(--ac-muted); overflow-wrap: anywhere; }
|
|
166
|
+
.zhin-sandbox .agent-playground-inline-run-steps i { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; }
|
|
167
|
+
.zhin-sandbox .agent-playground-inline-run-steps .is-failed i { background: var(--ac-bad); }
|
|
168
|
+
.zhin-sandbox .agent-playground-inline-run-empty { font-size: 12px; padding-top: 12px; color: var(--ac-muted); }
|
|
169
|
+
.zhin-sandbox .agent-playground-inline-run footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
|
|
170
|
+
.zhin-sandbox .agent-playground-inline-run footer { margin-top: 12px; }
|
|
171
|
+
.zhin-sandbox .agent-playground-conversation-details { padding: 20px; overflow: auto; flex: 1; }
|
|
172
|
+
.zhin-sandbox .agent-playground-history-navigation, .zhin-sandbox .agent-playground-history-notice { text-align: center; padding: 10px; color: var(--ac-muted); font-size: 12px; }
|
|
173
|
+
@media (min-width: 1280px) {
|
|
174
|
+
.zhin-sandbox.agent-playground-shell.has-inspector { grid-template-columns: 232px minmax(0,1fr) 330px; }
|
|
175
|
+
.zhin-sandbox .agent-playground-inspector { position: static; width: auto; }
|
|
176
|
+
}
|
|
177
|
+
@media (max-width: 1279px) {
|
|
178
|
+
.zhin-sandbox .agent-playground-inspector-overlay { display: block; position: absolute; inset: 0; background: #18181b40; z-index: 25; }
|
|
179
|
+
}
|
|
180
|
+
@media (max-width: 767px) {
|
|
181
|
+
.zhin-sandbox.agent-playground-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); height: calc(100dvh - 92px); min-height: 480px; border-radius: 10px; }
|
|
182
|
+
.zhin-sandbox .agent-playground-mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--ac-line); }
|
|
183
|
+
.zhin-sandbox .agent-playground-mobilebar strong { font-size: 13px; }
|
|
184
|
+
.zhin-sandbox .agent-playground-mobilebar button { font-size: 11px; padding: 6px; }
|
|
185
|
+
.zhin-sandbox .agent-playground-sessions { display: none; position: absolute; inset: 0 auto 0 0; width: min(280px,85%); z-index: 40; }
|
|
186
|
+
.zhin-sandbox .agent-playground-sessions.show { display: flex; }
|
|
187
|
+
.zhin-sandbox .channel-overlay { display: block; position: absolute; inset: 0; z-index: 35; background: #18181b40; }
|
|
188
|
+
.zhin-sandbox .agent-playground-runbar { padding: 12px; align-items: flex-start; flex-direction: column; gap: 10px; }
|
|
189
|
+
.zhin-sandbox .agent-playground-run-actions { justify-content: flex-start; }
|
|
190
|
+
.zhin-sandbox .agent-playground-run-actions > button[aria-controls="sandbox-run-inspector"] { display: none; }
|
|
191
|
+
.zhin-sandbox .agent-playground-message-scroll { padding: 20px 12px; }
|
|
192
|
+
.zhin-sandbox .agent-playground-composer { padding: 12px; }
|
|
193
|
+
.zhin-sandbox .agent-playground-composer > div:last-child { max-height: 32px; overflow: hidden; }
|
|
194
|
+
.zhin-sandbox .agent-playground-confirm { padding: 12px; flex-wrap: wrap; }
|
|
195
|
+
.zhin-sandbox .agent-playground-confirm > div { flex-basis: 100%; }
|
|
196
|
+
.zhin-sandbox .agent-playground-run-settings { padding: 12px; max-height: 240px; overflow: auto; }
|
|
197
|
+
.zhin-sandbox .agent-playground-empty { margin-top: 24px; }
|
|
198
|
+
.zhin-sandbox .agent-playground-prompts { flex-direction: column; }
|
|
199
|
+
}
|
|
200
|
+
`;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/** The adapter owns its workbench presentation; no styles from a particular Console shell are required. */
|
|
2
|
+
export const sandboxStyles = `
|
|
3
|
+
.zhin-sandbox.agent-playground-shell { position: relative; display: grid; grid-template-columns: 232px minmax(0,1fr); height: calc(100dvh - 72px); min-height: 520px; overflow: hidden; border: 1px solid var(--ac-line); border-radius: 14px; background: var(--ac-panel); }
|
|
4
|
+
.zhin-sandbox [hidden], .zhin-sandbox .hidden { display: none !important; }
|
|
5
|
+
.zhin-sandbox button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; border: 1px solid var(--ac-line); border-radius: 8px; min-height: 34px; padding: 6px 10px; color: var(--ac-ink); background: var(--ac-panel); cursor: pointer; font-size: 12px; line-height: 1.4; }
|
|
6
|
+
.zhin-sandbox button:hover:not(:disabled) { background: var(--ac-soft); }
|
|
7
|
+
.zhin-sandbox button:disabled { opacity: .45; cursor: not-allowed; }
|
|
8
|
+
.zhin-sandbox button.primary { background: var(--ac-primary); color: var(--ac-panel); border-color: var(--ac-primary); }
|
|
9
|
+
.zhin-sandbox button.danger, .zhin-sandbox .agent-playground-stop { color: var(--ac-bad); background: var(--ac-bad-bg); border-color: transparent; }
|
|
10
|
+
.zhin-sandbox .agent-playground-mobilebar { display: none; }
|
|
11
|
+
.zhin-sandbox .agent-playground-sessions { min-width: 0; display: flex; flex-direction: column; background: var(--ac-canvas); border-right: 1px solid var(--ac-line); overflow: hidden; }
|
|
12
|
+
.zhin-sandbox .agent-playground-brand { padding: 24px 18px; }
|
|
13
|
+
.zhin-sandbox .agent-playground-brand > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
14
|
+
.zhin-sandbox .agent-playground-brand > div > div { display: flex; align-items: center; gap: 10px; }
|
|
15
|
+
.zhin-sandbox .agent-playground-brand h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
|
|
16
|
+
.zhin-sandbox .agent-playground-brand small { font-size: 11px; color: var(--ac-muted); }
|
|
17
|
+
.zhin-sandbox .agent-playground-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ac-ink); color: var(--ac-panel); }
|
|
18
|
+
.zhin-sandbox .agent-playground-connection { display: grid; place-items: center; color: var(--ac-warn); }
|
|
19
|
+
.zhin-sandbox .agent-playground-connection.is-online, .zhin-sandbox .is-online { color: var(--ac-ok); }
|
|
20
|
+
.zhin-sandbox .agent-playground-section-label { display: flex; align-items: center; gap: 8px; padding: 0 18px 10px; font-size: 12px; color: var(--ac-muted); }
|
|
21
|
+
.zhin-sandbox .agent-playground-section-label button { margin-left: auto; min-height: 28px; padding: 4px; background: transparent; border-color: transparent; }
|
|
22
|
+
.zhin-sandbox .agent-playground-session-list { flex: 1; min-height: 0; overflow: auto; padding: 0 10px; }
|
|
23
|
+
.zhin-sandbox .agent-playground-session { display: flex; justify-content: flex-start; width: 100%; gap: 10px; padding: 12px 10px; border: 1px solid transparent; margin-bottom: 4px; background: transparent; text-align: left; }
|
|
24
|
+
.zhin-sandbox .agent-playground-session.active { background: var(--ac-panel); border-color: var(--ac-line); box-shadow: 0 2px 3px #19283e05; }
|
|
25
|
+
.zhin-sandbox .agent-playground-session-icon { color: var(--ac-muted); }
|
|
26
|
+
.zhin-sandbox .agent-playground-session.active .agent-playground-session-icon { color: var(--ac-primary); }
|
|
27
|
+
.zhin-sandbox .agent-playground-session > div { flex: 1; min-width: 0; }
|
|
28
|
+
.zhin-sandbox .agent-playground-session > div > div:first-child { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
29
|
+
.zhin-sandbox .agent-playground-session > div > div:last-child { font-size: 11px; color: var(--ac-muted); margin-top: 4px; }
|
|
30
|
+
.zhin-sandbox .agent-playground-new-session { padding: 16px 14px; }
|
|
31
|
+
.zhin-sandbox .agent-playground-add { width: 100%; background: var(--ac-panel); }
|
|
32
|
+
.zhin-sandbox .agent-playground-new-form { display: grid; gap: 10px; }
|
|
33
|
+
.zhin-sandbox .agent-playground-scope-picker, .zhin-sandbox .agent-playground-new-actions { display: flex; gap: 5px; }
|
|
34
|
+
.zhin-sandbox .agent-playground-scope-picker button { flex: 1; font-size: 11px; padding: 6px; }
|
|
35
|
+
.zhin-sandbox .agent-playground-scope-picker button.active { border-color: var(--ac-primary); color: var(--ac-primary); background: var(--ac-tint); }
|
|
36
|
+
.zhin-sandbox .agent-playground-new-actions { justify-content: flex-end; }
|
|
37
|
+
.zhin-sandbox .agent-playground-endpoint { padding: 14px 18px; border-top: 1px solid var(--ac-line); display: grid; gap: 3px; }
|
|
38
|
+
.zhin-sandbox .agent-playground-endpoint span { font-size: 11px; color: var(--ac-muted); }
|
|
39
|
+
.zhin-sandbox .agent-playground-endpoint strong { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
|
|
40
|
+
.zhin-sandbox .agent-playground-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
|
|
41
|
+
.zhin-sandbox .agent-playground-runbar { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--ac-line); }
|
|
42
|
+
.zhin-sandbox .agent-playground-run-identity { display: flex; gap: 10px; align-items: center; min-width: 0; }
|
|
43
|
+
.zhin-sandbox .agent-playground-run-identity > div { min-width: 0; }
|
|
44
|
+
.zhin-sandbox .agent-playground-run-icon { color: var(--ac-primary); }
|
|
45
|
+
.zhin-sandbox .agent-playground-run-title h1 { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
46
|
+
.zhin-sandbox .agent-playground-run-title span { font-size: 11px; color: var(--ac-muted); }
|
|
47
|
+
.zhin-sandbox .agent-playground-run-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
|
|
48
|
+
.zhin-sandbox .agent-playground-run-actions > a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px; text-decoration: none; }
|
|
49
|
+
.zhin-sandbox .agent-playground-run-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ac-muted); font-size: 11px; }
|
|
50
|
+
.zhin-sandbox .agent-playground-run-state.is-running { color: var(--ac-primary); }
|
|
51
|
+
.zhin-sandbox .agent-playground-run-state.has-problem { color: var(--ac-bad); }
|
|
52
|
+
.zhin-sandbox .agent-playground-confirm { display: flex; align-items: center; gap: 10px; background: var(--ac-warn-bg); color: var(--ac-warn); padding: 12px 20px; border-bottom: 1px solid var(--ac-line); font-size: 12px; }
|
|
53
|
+
.zhin-sandbox .agent-playground-confirm > div { flex: 1; display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
|
|
54
|
+
.zhin-sandbox .agent-playground-run-settings { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 24px; background: var(--ac-canvas); border-bottom: 1px solid var(--ac-line); }
|
|
55
|
+
.zhin-sandbox .agent-playground-run-settings label { display: grid; gap: 5px; flex: 1; min-width: 140px; }
|
|
56
|
+
.zhin-sandbox .agent-playground-run-settings label > span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ac-muted); }
|
|
57
|
+
.zhin-sandbox .agent-playground-run-settings input, .zhin-sandbox .agent-playground-run-settings select { font-size: 12px; padding: 7px 9px; }
|
|
58
|
+
.zhin-sandbox .agent-playground-run-settings .agent-playground-directory-field { flex-basis: 100%; }
|
|
59
|
+
.zhin-sandbox .agent-playground-run-settings .agent-playground-network-toggle { display: flex; align-items: center; gap: 10px; flex: none; }
|
|
60
|
+
.zhin-sandbox .agent-playground-network-toggle i { display: none; }
|
|
61
|
+
.zhin-sandbox .agent-playground-run-settings p { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--ac-warn); flex-basis: 100%; }
|
|
62
|
+
.zhin-sandbox .agent-playground-conversation { flex: 1; display: flex; min-height: 0; overflow: hidden; }
|
|
63
|
+
.zhin-sandbox .agent-playground-message-scroll { flex: 1; min-width: 0; overflow-y: auto; padding: 28px 24px; scrollbar-gutter: stable; }
|
|
64
|
+
.zhin-sandbox .agent-playground-empty { max-width: 560px; margin: clamp(24px, 8vh, 100px) auto 32px; text-align: center; }
|
|
65
|
+
.zhin-sandbox .agent-playground-empty-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 18px; background: var(--ac-tint); color: var(--ac-primary); }
|
|
66
|
+
.zhin-sandbox .agent-playground-empty h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 650; letter-spacing: -.025em; margin-bottom: 10px; }
|
|
67
|
+
.zhin-sandbox .agent-playground-empty p { color: var(--ac-muted); font-size: 13px; line-height: 1.8; max-width: 48ch; margin: 0 auto; }
|
|
68
|
+
.zhin-sandbox .agent-playground-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
|
|
69
|
+
.zhin-sandbox .agent-playground-prompts button { padding: 9px 12px; }
|
|
70
|
+
.zhin-sandbox .agent-playground-message-list { display: grid; gap: 24px; max-width: 780px; margin: 0 auto; }
|
|
71
|
+
.zhin-sandbox .agent-playground-message { display: flex; align-items: flex-start; gap: 12px; }
|
|
72
|
+
.zhin-sandbox .agent-playground-message-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ac-tint); color: var(--ac-primary); flex-shrink: 0; }
|
|
73
|
+
.zhin-sandbox .agent-playground-message.is-user .agent-playground-message-avatar { background: var(--ac-soft); color: var(--ac-muted); }
|
|
74
|
+
.zhin-sandbox .agent-playground-message-main { flex: 1; min-width: 0; }
|
|
75
|
+
.zhin-sandbox .agent-playground-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
|
|
76
|
+
.zhin-sandbox .agent-playground-message-meta strong { font-size: 12px; font-weight: 650; }
|
|
77
|
+
.zhin-sandbox .agent-playground-message-meta time { font-size: 10px; color: var(--ac-muted); }
|
|
78
|
+
.zhin-sandbox .agent-playground-message-meta span { color: var(--ac-warn); font-size: 10px; }
|
|
79
|
+
.zhin-sandbox .agent-playground-message-content { line-height: 1.8; overflow-wrap: anywhere; }
|
|
80
|
+
.zhin-sandbox .agent-playground-message-content img { max-width: 100%; border-radius: 10px; }
|
|
81
|
+
.zhin-sandbox .agent-playground-message.is-user .agent-playground-message-content { background: var(--ac-canvas); border-radius: 10px; padding: 12px 16px; }
|
|
82
|
+
.zhin-sandbox .agent-playground-message.is-approval { padding: 16px; background: var(--ac-warn-bg); border: 1px solid var(--ac-line); border-radius: 10px; }
|
|
83
|
+
.zhin-sandbox .agent-playground-composer { padding: 16px 24px; border-top: 1px solid var(--ac-line); display: grid; gap: 12px; background: var(--ac-panel); }
|
|
84
|
+
.zhin-sandbox .agent-playground-composer > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
|
|
85
|
+
.zhin-sandbox .agent-playground-composer > div:first-child > div.flex-1 { flex: 1; }
|
|
86
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) { display: flex; align-items: flex-end; gap: 10px; }
|
|
87
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > div { flex: 1; min-width: 0; }
|
|
88
|
+
.zhin-sandbox .agent-playground-composer > div:nth-last-child(2) > button { min-height: 42px; padding: 10px 16px; background: var(--ac-primary); border-color: var(--ac-primary); color: var(--ac-panel); }
|
|
89
|
+
.zhin-sandbox .agent-playground-composer > div:last-child { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 10px; color: var(--ac-muted); }
|
|
90
|
+
.zhin-sandbox .agent-playground-composer > div:last-child span { padding: 1px 4px; border: 1px solid var(--ac-line); border-radius: 4px; }
|
|
91
|
+
.zhin-sandbox [contenteditable="true"] { padding: 12px 14px; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; line-height: 1.6; overflow-y: auto; outline: none; }
|
|
92
|
+
.zhin-sandbox [contenteditable="true"]:focus-visible { border-color: var(--ac-primary); outline: 2px solid var(--ac-primary); outline-offset: 1px; }
|
|
93
|
+
.zhin-sandbox [contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--ac-muted); pointer-events: none; }
|
|
94
|
+
.zhin-sandbox .editor-face { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
|
|
95
|
+
.zhin-sandbox .editor-image { max-height: 100px; max-width: 100%; display: inline-block; }
|
|
96
|
+
.zhin-sandbox .sandbox-composer-tabs { display: flex; gap: 3px; padding: 3px; background: var(--ac-soft); border-radius: 8px; }
|
|
97
|
+
.zhin-sandbox .sandbox-composer-tabs button { border-color: transparent; min-height: 26px; background: transparent; }
|
|
98
|
+
.zhin-sandbox .sandbox-composer-tabs button.active { color: var(--ac-primary); background: var(--ac-panel); }
|
|
99
|
+
.zhin-sandbox .sandbox-markdown-preview { max-height: 200px; min-height: 44px; padding: 12px; overflow: auto; background: var(--ac-canvas); border: 1px solid var(--ac-line); border-radius: 10px; }
|
|
100
|
+
.zhin-sandbox .sandbox-markdown-preview-empty { color: var(--ac-muted); }
|
|
101
|
+
.zhin-sandbox .agent-playground-inspector { position: absolute; right: 0; top: 0; bottom: 0; width: min(360px, 90%); z-index: 30; display: flex; flex-direction: column; background: var(--ac-canvas); border-left: 1px solid var(--ac-line); overflow: auto; }
|
|
102
|
+
.zhin-sandbox .agent-playground-inspector-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--ac-line); }
|
|
103
|
+
.zhin-sandbox .agent-playground-inspector-head > div:last-child { display: flex; gap: 6px; }
|
|
104
|
+
.zhin-sandbox .agent-playground-inspector-head span { font-size: 11px; color: var(--ac-muted); }
|
|
105
|
+
.zhin-sandbox .agent-playground-inspector-head h2 { font-size: 17px; font-weight: 650; }
|
|
106
|
+
.zhin-sandbox .agent-playground-inspector-tabs { display: flex; gap: 6px; padding: 14px 16px; }
|
|
107
|
+
.zhin-sandbox .agent-playground-inspector-tabs button { flex: 1; background: transparent; border-color: transparent; }
|
|
108
|
+
.zhin-sandbox .agent-playground-inspector-tabs button.active { background: var(--ac-panel); border-color: var(--ac-line); color: var(--ac-primary); }
|
|
109
|
+
.zhin-sandbox .agent-playground-inspector-section { padding: 18px 20px; border-bottom: 1px solid var(--ac-line); }
|
|
110
|
+
.zhin-sandbox .agent-playground-inspector-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 650; }
|
|
111
|
+
.zhin-sandbox .agent-playground-inspector-title small { color: var(--ac-muted); font-weight: 400; font-size: 10px; }
|
|
112
|
+
.zhin-sandbox .agent-playground-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
|
|
113
|
+
.zhin-sandbox .agent-playground-metrics > div { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 4px 8px; padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
|
|
114
|
+
.zhin-sandbox .agent-playground-metrics svg { width: 15px; height: 15px; color: var(--ac-muted); }
|
|
115
|
+
.zhin-sandbox .agent-playground-metrics strong { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
|
|
116
|
+
.zhin-sandbox .agent-playground-metrics span { grid-column: 2; font-size: 10px; color: var(--ac-muted); }
|
|
117
|
+
.zhin-sandbox .agent-playground-metrics .has-problem svg { color: var(--ac-bad); }
|
|
118
|
+
.zhin-sandbox .agent-playground-context-list { display: grid; gap: 8px; font-size: 11px; }
|
|
119
|
+
.zhin-sandbox .agent-playground-context-list > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px; }
|
|
120
|
+
.zhin-sandbox .agent-playground-context-list dt { color: var(--ac-muted); }
|
|
121
|
+
.zhin-sandbox .agent-playground-context-list dd { overflow-wrap: anywhere; }
|
|
122
|
+
.zhin-sandbox .agent-playground-trace-list { display: grid; gap: 14px; }
|
|
123
|
+
.zhin-sandbox .agent-playground-trace-item { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; }
|
|
124
|
+
.zhin-sandbox .agent-playground-trace-item > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
|
|
125
|
+
.zhin-sandbox .agent-playground-trace-item strong { font-weight: 600; }
|
|
126
|
+
.zhin-sandbox .agent-playground-trace-item small, .zhin-sandbox .agent-playground-trace-item time { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
127
|
+
.zhin-sandbox .agent-playground-trace-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; margin-top: 6px; }
|
|
128
|
+
.zhin-sandbox .agent-playground-trace-item.is-error .agent-playground-trace-dot { background: var(--ac-bad); }
|
|
129
|
+
.zhin-sandbox .agent-playground-artifact-empty, .zhin-sandbox .agent-playground-trace-empty, .zhin-sandbox .agent-playground-trace-notice { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--ac-muted); padding: 12px 0; }
|
|
130
|
+
.zhin-sandbox .agent-playground-trace-notice { color: var(--ac-bad); }
|
|
131
|
+
.zhin-sandbox .agent-playground-task-list, .zhin-sandbox .agent-playground-artifact-list { display: grid; gap: 8px; }
|
|
132
|
+
.zhin-sandbox .agent-playground-task-list article { padding: 12px; border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; }
|
|
133
|
+
.zhin-sandbox .agent-playground-task-list article > div { display: flex; justify-content: space-between; font-size: 11px; }
|
|
134
|
+
.zhin-sandbox .agent-playground-task-list code { color: var(--ac-muted); font-size: 10px; }
|
|
135
|
+
.zhin-sandbox .agent-playground-task-list dl { display: flex; gap: 14px; margin-top: 8px; font-size: 10px; }
|
|
136
|
+
.zhin-sandbox .agent-playground-task-list dt { color: var(--ac-muted); }
|
|
137
|
+
.zhin-sandbox .agent-playground-artifact-list article { border: 1px solid var(--ac-line); background: var(--ac-panel); border-radius: 8px; overflow: hidden; }
|
|
138
|
+
.zhin-sandbox .agent-playground-artifact-list article > button { width: 100%; border: 0; border-radius: 0; padding: 12px; text-align: left; }
|
|
139
|
+
.zhin-sandbox .agent-playground-artifact-list article > button > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 4px; }
|
|
140
|
+
.zhin-sandbox .agent-playground-artifact-list small { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
141
|
+
.zhin-sandbox .agent-playground-artifact-list em { font-style: normal; color: var(--ac-muted); font-size: 10px; }
|
|
142
|
+
.zhin-sandbox .agent-playground-artifact-detail { padding: 12px; font-size: 11px; display: grid; gap: 8px; }
|
|
143
|
+
.zhin-sandbox .agent-playground-artifact-detail pre { max-height: 320px; overflow: auto; padding: 10px; background: var(--ac-canvas); border-radius: 6px; }
|
|
144
|
+
.zhin-sandbox .agent-playground-artifact-detail footer { display: flex; justify-content: space-between; color: var(--ac-muted); }
|
|
145
|
+
.zhin-sandbox .agent-playground-studio-link { display: grid; gap: 6px; padding: 18px 20px; font-size: 12px; margin-top: auto; border-top: 1px solid var(--ac-line); text-decoration: none; }
|
|
146
|
+
.zhin-sandbox .agent-playground-studio-link span { display: flex; gap: 7px; align-items: center; }
|
|
147
|
+
.zhin-sandbox .agent-playground-studio-link code { color: var(--ac-muted); font-size: 10px; overflow-wrap: anywhere; }
|
|
148
|
+
.zhin-sandbox .agent-playground-inspector-overlay, .zhin-sandbox .channel-overlay { display: none; }
|
|
149
|
+
.zhin-sandbox .agent-playground-inline-run { border: 1px solid var(--ac-line); border-radius: 10px; padding: 16px; background: var(--ac-canvas); }
|
|
150
|
+
.zhin-sandbox .agent-playground-inline-run-head { display: flex; align-items: flex-start; gap: 10px; }
|
|
151
|
+
.zhin-sandbox .agent-playground-inline-run-icon { color: var(--ac-muted); padding-top: 4px; }
|
|
152
|
+
.zhin-sandbox .agent-playground-inline-run-copy { flex: 1; min-width: 0; }
|
|
153
|
+
.zhin-sandbox .agent-playground-inline-run-copy > span { font-size: 10px; color: var(--ac-muted); }
|
|
154
|
+
.zhin-sandbox .agent-playground-inline-run-copy h3 { font-size: 14px; font-weight: 600; }
|
|
155
|
+
.zhin-sandbox .agent-playground-inline-run-copy p { font-size: 12px; color: var(--ac-muted); overflow-wrap: anywhere; margin-top: 4px; }
|
|
156
|
+
.zhin-sandbox .agent-playground-inline-run-actions { display: flex; gap: 6px; }
|
|
157
|
+
.zhin-sandbox .agent-playground-inline-run-metrics { display: flex; flex-wrap: wrap; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--ac-line); font-variant-numeric: tabular-nums; }
|
|
158
|
+
.zhin-sandbox .agent-playground-inline-run-metrics dt { font-size: 10px; color: var(--ac-muted); }
|
|
159
|
+
.zhin-sandbox .agent-playground-inline-run-metrics dd { font-size: 13px; font-weight: 600; }
|
|
160
|
+
.zhin-sandbox .agent-playground-inline-run-steps { padding: 0; list-style: none; margin: 16px 0; display: grid; gap: 12px; }
|
|
161
|
+
.zhin-sandbox .agent-playground-inline-run-steps li { display: flex; align-items: flex-start; gap: 8px; }
|
|
162
|
+
.zhin-sandbox .agent-playground-inline-run-steps li > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
|
|
163
|
+
.zhin-sandbox .agent-playground-inline-run-steps strong { font-size: 12px; font-weight: 600; }
|
|
164
|
+
.zhin-sandbox .agent-playground-inline-run-steps small, .zhin-sandbox .agent-playground-inline-run-steps li > span { font-size: 10px; color: var(--ac-muted); overflow-wrap: anywhere; }
|
|
165
|
+
.zhin-sandbox .agent-playground-inline-run-steps i { width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--ac-muted); flex-shrink: 0; }
|
|
166
|
+
.zhin-sandbox .agent-playground-inline-run-steps .is-failed i { background: var(--ac-bad); }
|
|
167
|
+
.zhin-sandbox .agent-playground-inline-run-empty { font-size: 12px; padding-top: 12px; color: var(--ac-muted); }
|
|
168
|
+
.zhin-sandbox .agent-playground-inline-run footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
|
|
169
|
+
.zhin-sandbox .agent-playground-inline-run footer { margin-top: 12px; }
|
|
170
|
+
.zhin-sandbox .agent-playground-conversation-details { padding: 20px; overflow: auto; flex: 1; }
|
|
171
|
+
.zhin-sandbox .agent-playground-history-navigation, .zhin-sandbox .agent-playground-history-notice { text-align: center; padding: 10px; color: var(--ac-muted); font-size: 12px; }
|
|
172
|
+
@media (min-width: 1280px) {
|
|
173
|
+
.zhin-sandbox.agent-playground-shell.has-inspector { grid-template-columns: 232px minmax(0,1fr) 330px; }
|
|
174
|
+
.zhin-sandbox .agent-playground-inspector { position: static; width: auto; }
|
|
175
|
+
}
|
|
176
|
+
@media (max-width: 1279px) {
|
|
177
|
+
.zhin-sandbox .agent-playground-inspector-overlay { display: block; position: absolute; inset: 0; background: #18181b40; z-index: 25; }
|
|
178
|
+
}
|
|
179
|
+
@media (max-width: 767px) {
|
|
180
|
+
.zhin-sandbox.agent-playground-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); height: calc(100dvh - 92px); min-height: 480px; border-radius: 10px; }
|
|
181
|
+
.zhin-sandbox .agent-playground-mobilebar { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid var(--ac-line); }
|
|
182
|
+
.zhin-sandbox .agent-playground-mobilebar strong { font-size: 13px; }
|
|
183
|
+
.zhin-sandbox .agent-playground-mobilebar button { font-size: 11px; padding: 6px; }
|
|
184
|
+
.zhin-sandbox .agent-playground-sessions { display: none; position: absolute; inset: 0 auto 0 0; width: min(280px,85%); z-index: 40; }
|
|
185
|
+
.zhin-sandbox .agent-playground-sessions.show { display: flex; }
|
|
186
|
+
.zhin-sandbox .channel-overlay { display: block; position: absolute; inset: 0; z-index: 35; background: #18181b40; }
|
|
187
|
+
.zhin-sandbox .agent-playground-runbar { padding: 12px; align-items: flex-start; flex-direction: column; gap: 10px; }
|
|
188
|
+
.zhin-sandbox .agent-playground-run-actions { justify-content: flex-start; }
|
|
189
|
+
.zhin-sandbox .agent-playground-run-actions > button[aria-controls="sandbox-run-inspector"] { display: none; }
|
|
190
|
+
.zhin-sandbox .agent-playground-message-scroll { padding: 20px 12px; }
|
|
191
|
+
.zhin-sandbox .agent-playground-composer { padding: 12px; }
|
|
192
|
+
.zhin-sandbox .agent-playground-composer > div:last-child { max-height: 32px; overflow: hidden; }
|
|
193
|
+
.zhin-sandbox .agent-playground-confirm { padding: 12px; flex-wrap: wrap; }
|
|
194
|
+
.zhin-sandbox .agent-playground-confirm > div { flex-basis: 100%; }
|
|
195
|
+
.zhin-sandbox .agent-playground-run-settings { padding: 12px; max-height: 240px; overflow: auto; }
|
|
196
|
+
.zhin-sandbox .agent-playground-empty { margin-top: 24px; }
|
|
197
|
+
.zhin-sandbox .agent-playground-prompts { flex-direction: column; }
|
|
198
|
+
}
|
|
199
|
+
`;
|