@thready-web/dsh-bot-plugin 0.1.0-beta.2 → 0.1.0-beta.4

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.
@@ -0,0 +1,91 @@
1
+ import { closeSync, constants, createReadStream, fstatSync, openSync, readSync, realpathSync } from 'node:fs';
2
+ import { extname, relative, resolve, sep } from 'node:path';
3
+ const TYPES = new Map([
4
+ ['.jpg', 'image/jpeg'],
5
+ ['.jpeg', 'image/jpeg'],
6
+ ['.png', 'image/png'],
7
+ ['.gif', 'image/gif'],
8
+ ['.webp', 'image/webp'],
9
+ ]);
10
+ function matchesImage(header, type) {
11
+ if (type === 'image/jpeg')
12
+ return header[0] === 0xff && header[1] === 0xd8 && header[2] === 0xff;
13
+ if (type === 'image/png')
14
+ return header.subarray(0, 8).equals(Buffer.from('89504e470d0a1a0a', 'hex'));
15
+ if (type === 'image/gif')
16
+ return /^GIF8[79]a$/.test(header.toString('ascii', 0, 6));
17
+ return header.toString('ascii', 0, 4) === 'RIFF' && header.toString('ascii', 8, 12) === 'WEBP';
18
+ }
19
+ function artifactPath(path) {
20
+ const parts = path.split('/');
21
+ return (parts.length >= 3 &&
22
+ (parts[1] === 'preview' || parts[1] === 'artifacts') &&
23
+ parts.every(part => part !== '' && !part.startsWith('.')));
24
+ }
25
+ /**
26
+ * Called only AFTER the workbench authentication gate and bundled UI lookup.
27
+ * Generated raster images live in the configured session workspace, not public/.
28
+ * Only <project>/preview/ and <project>/artifacts/ are deliberate artifact scopes.
29
+ * Never fall back to process cwd, never serve arbitrary files or active HTML/SVG.
30
+ */
31
+ export function serveWorkspaceImage(req, res, pathname, workspace) {
32
+ if (!workspace || (req.method !== 'GET' && req.method !== 'HEAD') || !pathname.startsWith('/dsh-bot/'))
33
+ return false;
34
+ let decoded;
35
+ try {
36
+ decoded = decodeURIComponent(pathname.slice('/dsh-bot/'.length));
37
+ }
38
+ catch {
39
+ return false;
40
+ }
41
+ if (!artifactPath(decoded) || /[\\\u0000-\u001f\u007f]/.test(decoded))
42
+ return false;
43
+ const type = TYPES.get(extname(decoded).toLowerCase());
44
+ if (!type)
45
+ return false;
46
+ let fd;
47
+ try {
48
+ const root = realpathSync(workspace);
49
+ const file = realpathSync(resolve(root, decoded));
50
+ if (!file.startsWith(root + sep) || !artifactPath(relative(root, file).split(sep).join('/')))
51
+ return false;
52
+ fd = openSync(file, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
53
+ // On Linux, verify the opened descriptor as well, closing symlink-swap races.
54
+ if (process.platform === 'linux') {
55
+ const opened = realpathSync(`/proc/self/fd/${fd}`);
56
+ if (!opened.startsWith(root + sep) || !artifactPath(relative(root, opened).split(sep).join('/')))
57
+ return false;
58
+ }
59
+ const stat = fstatSync(fd);
60
+ if (!stat.isFile())
61
+ return false;
62
+ const header = Buffer.alloc(12);
63
+ readSync(fd, header, 0, header.length, 0);
64
+ if (!matchesImage(header, type))
65
+ return false;
66
+ res.writeHead(200, {
67
+ 'content-type': type,
68
+ 'content-length': stat.size,
69
+ 'cache-control': 'private, no-store',
70
+ 'x-content-type-options': 'nosniff',
71
+ 'content-security-policy': "default-src 'none'; sandbox",
72
+ });
73
+ if (req.method === 'HEAD')
74
+ res.end();
75
+ else {
76
+ const stream = createReadStream(file, { fd, autoClose: true, start: 0 });
77
+ fd = undefined;
78
+ stream.on('error', () => res.destroy());
79
+ res.on('close', () => stream.destroy());
80
+ stream.pipe(res);
81
+ }
82
+ return true;
83
+ }
84
+ catch {
85
+ return false;
86
+ }
87
+ finally {
88
+ if (fd != null)
89
+ closeSync(fd);
90
+ }
91
+ }
@@ -82,6 +82,20 @@ async function* generate(options) {
82
82
  yield { type: 'finish', reason: { kind: 'tool-calls' } }
83
83
  return
84
84
  }
85
+ // Deterministic quota-loop fixture: first request consumes 2k and reports
86
+ // progress; after the gate resumes the next request reports the result.
87
+ const quotaHistory = JSON.stringify(messages)
88
+ if (!directed && options.purpose == null && quotaHistory.includes('FOUNDATIONS_QUOTA_LOOP') && !quotaHistory.includes('quota-finished')) {
89
+ const first = !quotaHistory.includes('quota-progress')
90
+ const args = JSON.stringify({ kind: first ? 'progress' : 'result', text: first ? 'quota-progress' : 'quota-finished' })
91
+ const id = `call_mock_quota_${Date.now()}`
92
+ yield { type: 'block-start', index: 0, blockType: 'tool-call' }
93
+ yield { type: 'tool-call-delta', index: 0, id, name: 'foundations_report', argumentsDelta: args }
94
+ yield { type: 'block-end', index: 0, block: { type: 'tool-call', id, name: 'foundations_report', arguments: args } }
95
+ yield { type: 'usage', usage: { inputTokens: first ? 1992 : 8, outputTokens: 8, totalTokens: first ? 2000 : 16 } }
96
+ yield { type: 'finish', reason: { kind: 'tool-calls' } }
97
+ return
98
+ }
85
99
  const briefingArgs = !directed && options.purpose == null && briefingIsLatest(messages)
86
100
  ? briefingReport(plainUserText(messages))
87
101
  : null
@@ -118,7 +132,8 @@ async function* generate(options) {
118
132
  )
119
133
  if (directed) {
120
134
  const match = /^FOUNDATIONS_TOOL\s+(\S+)\s+(\{[\s\S]*\})\s*$/.exec(text.trim())
121
- const name = match?.[1]?.startsWith('foundations_') ? match[1] : `foundations_${match?.[1] ?? 'recall'}`
135
+ // Explicit native tools used by the activity API regression; all other directives keep the foundations prefix.
136
+ const name = ['bash', 'todo_write'].includes(match?.[1]) || match?.[1]?.startsWith('foundations_') ? match[1] : `foundations_${match?.[1] ?? 'recall'}`
122
137
  const args = match?.[2] ?? '{}'
123
138
  const id = `call_mock_${Date.now()}`
124
139
  yield { type: 'block-start', index: 0, blockType: 'tool-call' }
@@ -191,7 +206,7 @@ function nextHostTool(messages) {
191
206
  }
192
207
  })
193
208
  if (index < 0) return null
194
- const lines = [...text.matchAll(/^FOUNDATIONS_HOST_TOOL\s+(write|edit)\s+(\{[\s\S]*?\})\s*$/gm)]
209
+ const lines = [...text.matchAll(/^FOUNDATIONS_HOST_TOOL\s+(write|edit|bash)\s+(\{[\s\S]*?\})\s*$/gm)]
195
210
  if (lines.length === 0) return null
196
211
  const after = messages.slice(index + 1)
197
212
  const done = after.filter(message => message?.role === 'tool').length
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thready-web/dsh-bot-plugin",
3
- "version": "0.1.0-beta.2",
3
+ "version": "0.1.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "DSH bot plugin: session persona, memory, work, hash routing, and the workbench. Pinned to @deepseek-ai/dsh 0.2.2-rc.1.",
6
6
  "license": "MIT",
@@ -32,18 +32,24 @@
32
32
  "build": "node build.mjs",
33
33
  "type-check": "tsc -p tsconfig.typecheck.json --noEmit && tsc -p tsconfig.client.json --noEmit",
34
34
  "test": "node scripts/unit-tests.mjs",
35
- "test:host": "npm run build && node --test test/host-integration.test.ts && node --test test/triggers-host.test.ts",
35
+ "test:host": "npm run build && node --test test/host-integration.test.ts && node --test test/triggers-host.test.ts && node --test test/budget-host.test.ts && node --test test/activity-host.test.ts && node --test test/work-host.test.ts && node --test test/work-bash-host.test.ts",
36
36
  "format": "biome format --write src test ui/src client.js scripts",
37
37
  "format:check": "biome check src test ui/src client.js scripts"
38
38
  },
39
39
  "engines": {
40
- "node": ">=22.18.0"
40
+ "node": ">=22.18.0",
41
+ "dsh": ">=0.2.2-rc.1 <0.2.3-0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@biomejs/biome": "^2.6.6",
44
45
  "@deepseek-ai/cordis": "~4.1.0",
46
+ "@deepseek-ai/dsh-api-session-controller": "^0.2.2-rc.1",
47
+ "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.1",
48
+ "@deepseek-ai/dsh-session": "^0.2.2-rc.1",
49
+ "@deepseek-ai/dsh-session-query": "^0.2.2-rc.1",
45
50
  "@types/node": "^24.10.0",
46
51
  "esbuild": "^0.25.0",
52
+ "linkedom": "^0.18.15",
47
53
  "typescript": "^5.9.3"
48
54
  },
49
55
  "dsh": {
@@ -0,0 +1 @@
1
+ :root{color-scheme:light;--dsw-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;--ds-font-family-code: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, "Liberation Mono", Menlo, Courier, "PingFang SC", "Microsoft YaHei";--dsw-radius-sm: 8px;--dsw-radius-lg: 16px;--dsw-radius-xl: 20px;--dsw-radius-panel: 28px;--bg: #fff;--sidebar: #f9fafb;--ink: rgb(15, 17, 21);--secondary: rgb(97, 102, 107);--tertiary: rgb(129, 133, 140);--caption: rgb(173, 178, 184);--hover: rgba(38, 49, 72, .06);--selected: rgb(235, 238, 242);--bubble: rgb(237, 243, 254);--line: rgba(0, 0, 0, .1);--line-strong: rgba(0, 0, 0, .12);--code-bg: #f9fafb;--inline-code: #f5f5f5;--link: rgb(65, 118, 230);--send: rgb(65, 118, 230);--send-hover: rgb(122, 170, 255);--selector: #f9fafb;--shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 4px 16px rgba(0, 0, 0, .03), 0 0 24px rgba(0, 0, 0, .03);font-family:var(--dsw-font-family);color:var(--ink);background:var(--bg)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0}#root{display:flex;justify-content:center}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default}a{color:var(--link);text-decoration:none}.shell{width:min(1120px,100%);height:100%;display:grid;grid-template-columns:268px minmax(0,1fr);background:var(--bg)}.side,.chat{min-width:0;min-height:0}.side{display:flex;flex-direction:column;background:var(--sidebar);padding:14px 10px 10px}.side-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 6px 12px}.brand{font-size:15px;font-weight:650}.side-actions{display:flex;gap:2px}.icon-btn,.add{width:28px;height:28px;border:0;border-radius:999px;display:grid;place-items:center;background:transparent;color:var(--ink)}.icon-btn:hover,.add:hover{background:var(--hover)}.icon-btn svg,.add svg,.send svg{width:16px;height:16px}.filter{margin:0 6px 8px;border:0;background:#fff;border-radius:8px;padding:8px 10px;outline:none}.note{color:#9a3412;font-size:12px;margin:0 8px 8px}.note.ok{color:var(--secondary)}.sessions{list-style:none;margin:0;padding:0;overflow:auto;flex:1}.sessions .empty{color:var(--tertiary);font-size:13px;padding:8px 10px}.session{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:0;background:transparent;border-radius:10px;padding:8px}.session:hover{background:var(--hover)}.session.selected{background:var(--selected)}.session-row{display:flex;align-items:center;border-radius:10px}.session-row .session{flex:1;min-width:0}.session-delete{flex:none;border:0;background:transparent;color:var(--tertiary);font-size:12px;padding:6px 8px;border-radius:8px}.session-delete:hover{color:#9a3412;background:var(--hover)}.session-delete.purge{color:#9a3412}.blank-head{flex-wrap:wrap}.blank-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 10px 4px;color:var(--tertiary);font-size:12px}.blank-head button{border:0;background:transparent;color:inherit;padding:0}.blank-head button:hover{color:var(--ink)}.mark{position:relative;width:28px;height:28px;border-radius:999px;display:grid;place-items:center;background:var(--selector);color:var(--secondary);font-size:13px;font-weight:650;flex:none}.bot-dot{position:absolute;right:-2px;bottom:-2px;width:8px;height:8px;border-radius:999px;background:#16a34a;box-shadow:0 0 0 2px var(--sidebar)}.bot-dot.wait{background:#2563eb}.session.selected .bot-dot{box-shadow:0 0 0 2px var(--selected)}.bot-badge .bot-dot{top:-2px;bottom:auto;box-shadow:0 0 0 2px var(--bg)}.session.selected .mark{background:#fff}.mark.bot-mark,.bot-badge{background:#111827;color:#fff;font-size:10px;font-weight:700;letter-spacing:.06em}.mark.bot-mark{width:auto;min-width:28px;padding:0 6px}.session.selected .mark.bot-mark{background:#111827;color:#fff}.bot-badge{position:relative;flex:none;border-radius:999px;padding:2px 7px;line-height:16px}.copy{min-width:0;flex:1}.name,.preview{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.name{font-size:14px;font-weight:560}.preview{color:var(--tertiary);font-size:12px;margin-top:1px}.preview:empty:before{content:"​"}.me-row{display:flex;align-items:center;gap:4px}.me{display:flex;align-items:center;gap:8px;flex:1;min-width:0;border:0;background:transparent;border-radius:10px;padding:8px;text-align:left}.lang-switch{flex:none;border:0;background:transparent;border-radius:8px;padding:6px 8px;color:var(--tertiary);font:inherit;font-size:12px}.lang-switch:hover{background:var(--hover);color:var(--ink)}.me:hover{background:var(--hover)}.me-mark{background:var(--ink);color:#fff;font-size:12px}.status{background:#fff;border-radius:14px;padding:10px 12px;margin:8px;box-shadow:var(--shadow);font-size:13px}.status p{margin:0 0 6px}.status p:last-child{margin:0}.muted{color:var(--tertiary)}.chat{display:flex;flex-direction:column;background:var(--bg)}.inbox-line{display:flex;flex-direction:column;align-items:flex-end;gap:4px;width:min(320px,86%);margin:12px 0 12px auto}.inbox-line time{color:var(--caption);font-size:12px;line-height:18px}.inbox-entry{display:flex;align-items:center;gap:10px;width:100%;border:0;background:#fff;text-align:left;border-radius:16px;box-shadow:var(--shadow);padding:10px 12px}.inbox-entry:hover{background:var(--sidebar)}.inbox-icon{width:28px;height:28px;border-radius:8px;flex:none;display:grid;place-items:center;background:#111827;color:#fff}.inbox-icon svg{width:16px;height:16px}.inbox-copy{min-width:0;display:flex;flex-direction:column}.inbox-copy strong,.inbox-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inbox-copy strong{font-size:13px;line-height:18px;font-weight:600}.inbox-copy span{color:var(--secondary);font-size:12px;line-height:18px}.bot-chat-back{display:inline;flex:none;border:0;background:transparent;padding:0;color:var(--link);font-size:13px}.bot-chat-lead{margin:8px 0 16px;color:var(--tertiary);font-size:13px;line-height:20px}.bot-out{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:min(525px,82%);margin:18px 0 18px auto}.bot-out span,.bot-out time{color:var(--caption);font-size:12px;line-height:18px}.chat-head{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 22px}.chat-head h1{flex:1;min-width:0;margin:0;font-size:14px;font-weight:560;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.basis{margin:0;padding:0 22px 8px;color:var(--tertiary);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-crumb{display:flex;align-items:center;gap:6px;min-width:0;margin:0;padding:0 22px 8px;color:var(--tertiary);font-size:13px;line-height:20px}.work-crumb button{flex:none;max-width:46%;border:0;background:transparent;padding:0;color:var(--link);font-size:13px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-crumb>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink)}.setup-mask{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:24px;background:#0f111547}.setup-card{width:min(480px,100%);max-height:calc(100vh - 48px);overflow:auto;background:#fff;border-radius:20px;padding:18px 18px 14px;box-shadow:0 0 0 .5px #0000001a,0 16px 48px #0000001f}.setup-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.setup-head h2{margin:0;font-size:16px;font-weight:560}.setup-close{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--secondary)}.setup-close:hover{background:var(--hover)}.setup-lead{margin:8px 0 0;color:var(--secondary);font-size:13px;line-height:1.45}.setup-card label{display:block;margin:14px 0 6px;font-size:13px}.setup-card textarea,.setup-card input,.setup-card select{width:100%;border:0;background:var(--sidebar);border-radius:10px;padding:8px 10px;outline:none}.setup-card textarea{resize:vertical}.setup-card input+input,.setup-card select+input{margin-top:8px}.setup-error{color:#9a3412;font-size:12px;margin:10px 0 0}.setup-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.setup-actions button{border:0;border-radius:999px;padding:8px 14px;background:var(--hover)}.setup-actions .primary{background:var(--send);color:#fff}.setup-actions .primary:disabled{opacity:.6}.chat-head a{flex:none;font-size:13px;color:var(--secondary)}.work-chip{flex:none;color:var(--secondary);font-size:12px;line-height:18px;background:var(--selector);border-radius:999px;padding:2px 8px}.briefing-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:min(640px,100%);margin:18px 0}.briefing-row time{color:var(--caption);font-size:12px;line-height:18px}.briefing-card{width:100%;background:var(--code-bg);border:.5px solid var(--line);border-radius:16px}.briefing-toggle{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;min-height:40px;padding:10px 14px 12px;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.briefing-card.open .briefing-toggle{padding-bottom:0}.briefing-title{font-size:14px;line-height:20px;font-weight:600}.briefing-rev{color:var(--secondary);font-size:12px;line-height:18px;background:#fff;border-radius:999px;padding:2px 8px}.briefing-chevron{width:14px;height:14px;margin-left:auto;flex:none;color:var(--tertiary);transition:transform .3s ease}.briefing-card.open .briefing-chevron{transform:rotate(180deg)}.briefing-preview{flex:1 0 100%;margin:0;color:var(--secondary);font-size:13px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.briefing-body{padding:4px 14px 12px}.briefing-body .markdown p{margin:8px 0}.briefing-facts,.briefing-note{margin:8px 0 0;color:var(--tertiary);font-size:12px;line-height:18px}.work-card{margin:14px 0 18px;padding:12px 14px;border:.5px solid var(--line);border-radius:16px;background:var(--code-bg)}.work-card header{display:flex;align-items:center;justify-content:space-between;gap:12px}.work-card h3{margin:0;min-width:0;font-size:14px;line-height:20px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.work-status{flex:none;color:var(--secondary);font-size:12px;line-height:18px;background:#fff;border-radius:999px;padding:2px 8px}.work-status.live{color:var(--ink)}.work-card p{margin:6px 0 0;color:var(--secondary);font-size:13px;line-height:20px}.work-card .work-question{color:var(--ink)}.work-card .stale{text-decoration:line-through;color:var(--tertiary)}.work-quiet{color:var(--tertiary)}.work-reply{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:10px}.work-reply label{display:flex;flex-direction:column;gap:6px;width:100%}.work-reply span{color:var(--tertiary);font-size:12px;line-height:18px}.work-reply textarea{width:100%;resize:vertical;min-height:56px;border:.5px solid var(--line);border-radius:10px;background:#fff;padding:8px 10px;outline:none}.work-reply button{border:0;border-radius:999px;background:var(--send);color:#fff;padding:6px 12px;font-size:13px;line-height:20px}.work-reply button:disabled{opacity:.45}.work-open{margin-top:8px;border:0;background:transparent;padding:0;color:var(--link);font-size:13px;line-height:20px}.work-card .work-error{color:#9a3412}.work-refused{margin:8px 0 14px;color:#9a3412;font-size:13px;line-height:20px}.work-note{margin:4px 0 12px;color:var(--secondary);font-size:13px;line-height:20px}.user-question-card{margin:14px 0 18px;padding:14px 16px;min-width:0;border:.5px solid var(--line);border-radius:16px;background:var(--code-bg)}.user-question+.user-question{margin-top:16px;padding-top:16px;border-top:.5px solid var(--line)}.user-question-header{margin:0 0 6px;font-size:13px;line-height:20px;font-weight:600;color:var(--secondary)}.user-question-text{margin:0;font-size:15px;line-height:24px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}.user-question-hint,.user-question-status{margin:8px 0 0;font-size:13px;line-height:20px;color:var(--secondary)}.user-question-status.exception{color:#9a3412}.user-question-options{display:flex;flex-direction:column;gap:8px;margin:12px 0 0;padding:0;list-style:none}.user-question-option{display:flex;flex-direction:column;gap:2px;width:100%;min-width:0;margin:0;padding:10px 12px;border:.5px solid var(--line);border-radius:12px;background:#fff;box-sizing:border-box;text-align:left;font:inherit;color:inherit}button.user-question-option{cursor:pointer}button.user-question-option:hover:not(:disabled),button.user-question-option:focus-visible{border-color:var(--ink)}button.user-question-option:disabled{cursor:default;opacity:.7}.user-question-option.selected{border-color:var(--ink)}.user-question-actions{display:flex;flex-direction:column;gap:8px;margin-top:10px}.user-question-custom{display:flex;flex-direction:column;gap:4px;font-size:13px;line-height:20px;color:var(--secondary)}.user-question-custom textarea{width:100%;min-width:0;box-sizing:border-box;resize:vertical;padding:8px 10px;border:.5px solid var(--line);border-radius:10px;font:inherit;color:var(--ink)}.user-question-skip,.user-question-submit{align-self:flex-start;margin-top:4px;padding:6px 12px;border:.5px solid var(--line);border-radius:10px;background:#fff;font:inherit;font-size:13px;line-height:20px;color:var(--ink);cursor:pointer}.user-question-submit{margin-top:12px}.user-question-option-label{font-size:14px;line-height:22px;color:var(--ink);overflow-wrap:anywhere}.user-question-option-desc{font-size:13px;line-height:20px;color:var(--secondary);overflow-wrap:anywhere}.user-question-badge{display:inline-block;margin-left:6px;padding:0 6px;border-radius:999px;background:var(--line);font-size:11px;line-height:18px;font-weight:600;color:var(--secondary);vertical-align:middle}.user-question-wait,.user-question-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px}.user-question-plan{margin-top:10px;min-width:0;overflow:auto}.user-question-secret{margin:8px 0 0;letter-spacing:.2em;color:var(--secondary)}.user-question-secret-input{width:100%;min-width:0;box-sizing:border-box;padding:8px 10px;border:.5px solid var(--line);border-radius:10px;font:inherit;color:transparent;text-shadow:0 0 0 var(--ink);-webkit-text-security:disc}.settings-drawer{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center;pointer-events:none}.settings-drawer-mask{position:absolute;inset:0;pointer-events:auto;background:#0f111547;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.settings-drawer-sheet{position:relative;z-index:1;pointer-events:auto;display:flex;flex-direction:column;width:min(748px,100%);max-width:100%;max-height:min(90vh,100dvh);padding-bottom:env(safe-area-inset-bottom,0px);border-radius:20px 20px 0 0;background:#fff;box-shadow:var(--shadow);overflow:hidden;animation:settings-drawer-up .22s ease-out}.settings-drawer-handle{width:36px;height:4px;margin:8px auto 0;border-radius:999px;background:var(--line);flex:none}.settings-drawer-body{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:0 16px 16px}@keyframes settings-drawer-up{0%{transform:translateY(16px);opacity:.64}to{transform:translateY(0);opacity:1}}@media(prefers-reduced-motion:reduce){.settings-drawer-sheet{animation:none}}@media(max-width:800px){.settings-drawer-sheet{width:100%;border-radius:16px 16px 0 0}}.settings-head,.settings-confirm{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.settings-head{flex:none;padding:8px 16px}.settings-head h3{margin:0;font-size:15px;line-height:24px}button.chip{cursor:pointer;font:inherit}.back{display:none;border:0;background:transparent;padding:0;color:var(--link)}.scroll{flex:1;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:8px 28px 12px;scrollbar-width:thin;scrollbar-color:#e5e5e5 transparent}.scroll::-webkit-scrollbar{width:5px;height:5px}.scroll::-webkit-scrollbar-track{margin-block:2px;background:transparent}.scroll::-webkit-scrollbar-thumb{background:#e5e5e5;background-clip:content-box;border-radius:999px}.scroll::-webkit-scrollbar-thumb:hover{background:#d4d4d4}.scroll::-webkit-scrollbar-corner{background:transparent}.chat-body{position:relative;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;container-type:inline-size}.turn-rail{position:absolute;z-index:4;top:50%;right:14px;width:28px;max-height:min(420px,calc(100% - 48px));transform:translateY(-50%);overflow-y:auto;scrollbar-width:none}.turn-rail::-webkit-scrollbar{display:none}.turn-rail.fade-top{-webkit-mask-image:linear-gradient(transparent 0,#000 24px 100%);mask-image:linear-gradient(transparent 0,#000 24px 100%)}.turn-rail.fade-bottom{-webkit-mask-image:linear-gradient(#000 0 calc(100% - 24px),transparent 100%);mask-image:linear-gradient(#000 0 calc(100% - 24px),transparent 100%)}.turn-rail.fade-top.fade-bottom{-webkit-mask-image:linear-gradient(transparent 0,#000 24px calc(100% - 24px),transparent 100%);mask-image:linear-gradient(transparent 0,#000 24px calc(100% - 24px),transparent 100%)}.turn-mark{display:block;width:28px;height:10px;padding:0;border:0;border-radius:8px;background:transparent;position:relative}.turn-mark:before{content:"";position:absolute;top:50%;right:0;width:20px;height:2px;border-radius:2px;background:#00000029;transform-origin:100% 50%;transform:translateY(-50%) scaleX(.6);transition:transform .14s,background-color .14s}.turn-mark.preview:before{background:var(--tertiary);transform:translateY(-50%) scaleX(.9)}.turn-mark.active:before{background:var(--ink);transform:translateY(-50%) scaleX(1)}.turn-mark.busy:before{animation:turn-mark-busy 1s ease-in-out infinite}.turn-mark:focus-visible{outline:none}.turn-mark:focus-visible:before{background:var(--send);transform:translateY(-50%) scaleX(1)}@keyframes turn-mark-busy{50%{opacity:.35}}@container (max-width: 800px){.turn-rail{display:none}}@media(prefers-reduced-motion:reduce){.turn-mark:before,.turn-mark.busy:before,.chunk-loading,.chunk-progress-fill,.chunk-progress-fill.indeterminate{transition:none;animation:none}}.column{width:min(748px,100%);max-width:100%;min-width:0;margin:0 auto}.empty-thread{text-align:center;color:var(--tertiary);margin:48px 0}.chunk-loading{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transform:translateY(8px);background:#ffffff8c;transition:opacity .28s ease,transform .28s ease}.chunk-loading.visible{opacity:1;transform:none}.chunk-loading-card{display:flex;flex-direction:column;align-items:center;gap:10px;width:min(240px,72%);padding:16px 20px 14px;border-radius:16px;background:#ffffffe0;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:var(--shadow)}.chunk-loading p{margin:0;text-align:center}.chunk-progress-track{position:relative;width:100%;height:3px;border-radius:999px;background:var(--selected);overflow:hidden}.chunk-progress-fill{height:100%;border-radius:inherit;background:var(--send);transition:width .18s ease}.chunk-progress-fill.indeterminate{position:absolute;left:0;top:0;width:40%;animation:chunk-indeterminate 1.1s ease-in-out infinite}@keyframes chunk-indeterminate{0%{transform:translate(-120%)}to{transform:translate(280%)}}.user-row{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:min(525px,82%);min-width:0;margin:18px 0 18px auto}.user-bubble{max-width:100%;background:var(--bubble);border-radius:var(--dsw-radius-xl);padding:10px 16px;font-size:14px;line-height:22px;white-space:pre-wrap;word-break:break-word}.user-row time{color:var(--caption);font-size:12px;line-height:18px}.mail-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:min(640px,100%);margin:18px 0}.mail-row time{color:var(--caption);font-size:12px;line-height:18px}.mail-card{width:100%;background:#fff;border-radius:18px;box-shadow:var(--shadow);overflow:hidden}.mail-head{display:flex;align-items:center;gap:10px;padding:14px 16px 0}.mail-who{min-width:0;display:flex;flex-direction:column}.mail-who strong{font-size:14px;line-height:20px;font-weight:600}.mail-who span{color:var(--tertiary);font-size:12px;line-height:18px}.mail-hop{margin-left:auto;flex:none;color:var(--secondary);font-size:12px;line-height:18px;background:var(--selector);border-radius:999px;padding:2px 8px}.mail-body{padding:10px 16px 0}.mail-body .markdown p{margin:10px 0}.mail-note{margin:8px 0 0;padding:0 16px;color:var(--tertiary);font-size:12px;line-height:18px}.mail-details{padding:6px 16px 14px}.mail-details summary{color:var(--tertiary);font-size:12px;line-height:18px;cursor:pointer}.mail-details pre{margin:8px 0 0;color:var(--secondary);white-space:pre-wrap;word-break:break-all;font:11px / 18px var(--ds-font-family-code)}.assistant{margin:8px 0 20px;min-width:0}.live-status{margin:8px 0 16px;font-size:13px;line-height:20px}.shimmer{background-image:linear-gradient(90deg,var(--secondary) 0%,var(--ink) 42%,var(--secondary) 84%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:sheen 1.3s linear infinite}@keyframes sheen{0%{background-position:100% 0}to{background-position:-100% 0}}.markdown.streaming>:last-child:after,.assistant.streaming .markdown>:last-child:after{content:"";display:inline-block;width:7px;height:14px;margin-left:3px;vertical-align:text-bottom;border-radius:1px;background:var(--send);animation:caret 1s steps(1) infinite}@keyframes caret{50%{opacity:0}}.duration{font-family:var(--ds-font-family-code);font-variant-numeric:tabular-nums}.coll-container{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s ease}.coll-container>div{overflow:hidden}.coll-container.expand{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){.coll-container{transition:none}}.turn-failure{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:4px 0 16px}.turn-failed-label{margin:0;color:#d1242f;font-size:14px;line-height:24px}.retry-row{color:var(--tertiary);font-size:13px;line-height:20px}.retry-row summary{cursor:pointer}.retry-row p{margin:2px 0 2px 16px}.turn-error{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin:0;color:#d1242f;font-size:14px;line-height:22px}.turn-error-title{font-weight:600}.turn-error code{color:var(--tertiary);font-size:12px}.retry-turn{height:28px;padding:0 12px;border:.5px solid rgba(0,0,0,.16);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:13px;cursor:pointer}.retry-turn:disabled{color:var(--tertiary);cursor:default}.activity-group{margin:2px 0 8px}.activity-group .official-leading svg:not(.chevron){color:#22c55e}.activity-group[data-state=running] .official-leading svg:not(.chevron){color:var(--tertiary)}.activity-body{margin-left:16px}.official-row{min-width:0}.official-title{display:flex;align-items:center;gap:6px;width:100%;min-width:0;min-height:24px;padding:0;border:0;background:none;color:var(--tertiary);font:inherit;font-size:14px;line-height:24px;text-align:left;cursor:pointer}.official-title:disabled{cursor:default}.official-title:hover{color:var(--secondary)}.official-leading{display:grid;place-items:center;width:16px;height:24px;flex:none}.official-leading svg{grid-area:1 / 1;width:14px;height:14px;transform-origin:center}.official-leading .chevron{opacity:0}.official-title:hover .chevron,.official-row.open>.official-title .chevron{opacity:1}.official-title:hover .official-leading svg:not(.chevron),.official-row.open>.official-title .official-leading svg:not(.chevron){opacity:0}.official-label{flex:none;min-width:0;line-height:inherit}.official-dot{width:2px;height:2px;border-radius:1px;background:var(--caption);flex:none}.official-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:20px}.official-summary.streaming{-webkit-mask-image:linear-gradient(to right,black calc(100% - 48px),transparent);mask-image:linear-gradient(to right,black calc(100% - 48px),transparent)}.official-size{flex:none;color:var(--caption);font-size:12px}.diff-counts{display:inline-flex;gap:6px;flex:none;font-family:var(--ds-font-family-code);font-size:12px}.diff-plus{color:#22c55e}.diff-minus{color:#ec1313}.think-body{margin:4px 0 8px 22px;color:var(--secondary);font-size:13px;line-height:20px;white-space:pre-wrap;word-break:break-word}.diff-card{margin:8px 0 8px 22px;max-width:100%;min-width:0;background:#f9fafb;border-radius:16px;overflow:hidden;color:var(--ink)}.diff-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 18px 8px 22px;color:var(--tertiary);font:11px / 18px var(--dsw-font-family)}.diff-heading{display:flex;align-items:baseline;gap:12px;min-width:0}.diff-lang{font-family:var(--ds-font-family-code);flex:none}.diff-file{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.diff-copy{width:24px;height:24px;border:0;border-radius:8px;background:transparent;color:var(--secondary);display:grid;place-items:center;padding:0}.diff-copy svg{width:14px;height:14px}.diff-copy:hover{background:#2631480f}.diff-body{display:grid;grid-template-columns:minmax(0,1fr);max-width:100%;min-width:0;padding:6px 0 16px;font:11px / 19px var(--ds-font-family-code);overflow-x:auto}.diff-line{display:block;width:auto;height:auto;min-height:1lh;padding:0 22px;border:0;border-radius:0;background:transparent;white-space:pre}.diff-line:before{display:inline}.diff-line.added{color:#22c55e;background:#22c55e14;box-shadow:inset 3px 0 #22c55e}.diff-line.added:before{content:"+ "}.diff-line.removed{color:#ec1313;background:#ec131314;box-shadow:inset 3px 0 #ec1313}.diff-line.removed:before{content:"- "}.diff-line.same{color:var(--secondary)}.diff-line.same:before{content:" "}.diff-output{margin:0;padding:6px 22px 16px;white-space:pre-wrap;overflow-wrap:anywhere;font:11px / 19px var(--ds-font-family-code)}.markdown{min-width:0;overflow-wrap:anywhere;font-size:14px;line-height:24px;color:var(--ink)}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown strong{font-weight:600}.markdown h1{font-size:21px;line-height:30px;font-weight:700;margin:32px 0 16px}.markdown h2{font-size:19px;line-height:28px;font-weight:700;margin:32px 0 16px}.markdown h3{font-size:18px;line-height:26px;font-weight:700;margin:32px 0 16px}.markdown h4{font-size:14px;line-height:24px;font-weight:600;margin:16px 0}.markdown p{margin:16px 0}.markdown a,.file-mention{color:var(--link);font-weight:500}.markdown a:hover,.file-mention:hover,.file-mention:focus-visible{text-decoration:underline dotted var(--link);text-underline-offset:3px}.file-mention{margin:0;padding:0;border:0;background:none;font:inherit;font-weight:500;color:var(--link);cursor:pointer;text-align:inherit}.file-mention:focus{outline:none}.markdown ul,.markdown ol{margin:16px 0;padding-left:18px}.markdown li:not(:first-child){margin-top:6px}.markdown li::marker{color:var(--secondary)}.markdown li>p{margin:8px 0}.markdown hr{border:0;height:.5px;margin:32px 0;background:var(--line)}.markdown blockquote{border-left:2px solid var(--caption);margin:16px 0 0;padding-left:14px}.markdown :not(pre)>code{font-family:var(--ds-font-family-code);font-size:.875em;background:var(--inline-code);border:.5px solid rgba(0,0,0,.04);border-radius:var(--dsw-radius-sm);padding:0 5px;overflow-wrap:anywhere;word-break:break-word}.markdown img{max-width:100%;height:auto}.table-scroll{max-width:100%;min-width:0;overflow-x:auto;margin:16px 0}.table-scroll table{border-collapse:collapse;width:100%}.table-scroll th,.table-scroll td{text-align:start;padding:10px 16px;vertical-align:top;font-size:13px;line-height:22px;max-width:min(30vw,320px);min-width:88px}.table-scroll th{font-weight:500;border-bottom:.5px solid var(--line-strong)}.table-scroll td{border-bottom:.5px solid var(--line)}.table-scroll th:first-child,.table-scroll td:first-child{padding-left:0}.table-scroll td:last-child,.table-scroll th:last-child{padding-right:0}.code-block{margin:16px 0;max-width:100%;min-width:0;background:var(--code-bg);border-radius:var(--dsw-radius-lg);color:var(--ink)}.code-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 18px 8px 22px;font-size:11px;line-height:18px;color:var(--tertiary);border-top-left-radius:inherit;border-top-right-radius:inherit}.code-lang{font-family:var(--ds-font-family-code)}.code-copy{border:0;background:transparent;padding:0;color:var(--secondary);font-size:11px}.code-block pre{margin:0;padding:6px 22px 20px;overflow-x:auto;font:11px / 19px var(--ds-font-family-code);white-space:pre-wrap;overflow-wrap:anywhere;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-block code{font:inherit;background:none;padding:0;border:0}.composer-wrap{min-width:0;padding:0 28px 10px}.card{position:relative;display:flex;flex-direction:column;gap:12px;padding-top:8px;border-radius:var(--dsw-radius-panel);background:#fff;box-shadow:var(--shadow)}.mention-menu{position:absolute;left:8px;right:8px;bottom:calc(100% + 8px);z-index:5;padding:6px;border-radius:12px;background:#fff;box-shadow:var(--shadow)}.mention-menu button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:transparent;border-radius:8px;padding:8px 10px;font-size:13px;line-height:20px}.mention-menu button.active,.mention-menu button:hover{background:var(--hover)}.mention-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mention-empty{margin:2px 10px 6px;color:var(--tertiary);font-size:12px;line-height:18px}.card textarea{width:100%;border:0;resize:none;outline:none;background:transparent;min-height:36px;max-height:160px;padding:4px 14px 0;line-height:24px;font-size:14px}.card-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 8px 8px}.tools,.trailing{display:flex;align-items:center;gap:12px;min-width:0}.tools{position:relative}.plus-menu{position:absolute;left:0;bottom:calc(100% + 10px);z-index:4;width:240px;padding:6px;border-radius:12px;background:#fff;box-shadow:var(--shadow)}.plus-menu button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:8px;padding:8px 10px;font-size:13px;line-height:20px}.plus-menu button:hover{background:var(--hover)}.plus-note{margin:2px 10px 6px;color:var(--tertiary);font-size:12px;line-height:18px}.trailing{margin-left:auto}.chip{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 4px;color:var(--secondary);font-size:13px;font-weight:500;white-space:nowrap}.chip svg{width:16px;height:16px;flex:none}.model{color:var(--secondary);font-size:13px;font-weight:500;white-space:nowrap}.add{background:var(--selector)}.add:disabled{opacity:.5}.send,.stop{width:34px;height:34px;border:0;border-radius:999px;display:grid;place-items:center;color:#fff}.send{background:var(--send)}.send:hover:not(:disabled){background:var(--send-hover)}.send:disabled{opacity:.4}.stop{background:var(--ink)}.stop-icon{width:10px;height:10px;border-radius:2px;background:#fff}.stats{min-height:20px;margin:6px 8px 0;color:var(--caption);font-size:12px;line-height:20px;text-align:center}.file-modal{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:24px}.file-modal-mask{position:absolute;inset:0;background:#0f111547;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.file-modal-card{position:relative;z-index:1;display:flex;flex-direction:column;width:min(760px,100%);height:min(640px,calc(100vh - 48px));border-radius:var(--dsw-radius-panel);background:#fff;overflow:hidden;box-shadow:0 0 0 .5px #0000001a,0 16px 48px #0000001f}.file-modal-card:focus{outline:none}.file-modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:22px 14px 12px 24px;flex:none}.file-modal-title{min-width:0;display:flex;flex-direction:column}.file-modal-title strong{font-size:16px;line-height:24px;font-weight:500}.file-modal-title span{color:var(--tertiary);font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-modal-close{width:28px;height:28px;border:0;border-radius:var(--dsw-radius-sm);background:transparent;color:var(--secondary);display:grid;place-items:center;padding:0;flex:none}.file-modal-close svg{width:14px;height:14px}.file-modal-close:hover{background:var(--hover)}.file-modal-status,.file-modal-note{margin:0;padding:8px 24px 24px;color:var(--secondary);font-size:14px}.file-preview{display:flex;flex-direction:column;min-height:0;flex:auto}.file-preview-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px 8px 24px;color:var(--tertiary);font:11px / 18px var(--ds-font-family-code)}.file-preview-scroll{flex:auto;min-height:0;overflow:auto}.file-preview pre{margin:0;padding:8px 24px 24px}.file-preview code{display:block;counter-reset:source-line;font:12px / 20px var(--ds-font-family-code);color:var(--ink)}.source-line{display:block;min-height:1lh;position:relative;white-space:pre;padding-left:calc(var(--line-width, 2ch) + 16px)}.source-line:before{counter-increment:source-line;content:counter(source-line);position:absolute;left:0;width:var(--line-width, 2ch);text-align:end;color:var(--tertiary);-webkit-user-select:none;user-select:none}.source-line.current{background:#4176e61a}@media(max-width:800px){.shell{grid-template-columns:1fr}.shell.in-chat .side{display:none}.shell:not(.in-chat) .chat{display:none}.back{display:inline}.scroll,.composer-wrap{padding-left:16px;padding-right:16px}}.activity-status{font-size:11px;line-height:24px;opacity:.75;flex-shrink:0;white-space:normal}.tool-activity .official-title{flex-wrap:wrap;align-items:flex-start}.tool-activity .official-label{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere}.tool-activity.open>.official-title .chevron,.activity-arguments.open>.official-title .chevron{transform:rotate(180deg)}.activity-arguments{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:4px}.activity-arguments>.official-title{grid-column:1;grid-row:1;min-width:0;min-height:24px;font-size:12px;line-height:24px;align-items:flex-start}.activity-arguments>.diff-copy{grid-column:2;grid-row:1}.activity-arguments>.activity-panel{grid-column:1 / -1;min-width:0}.activity-block-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:24px;color:var(--tertiary);font-size:12px;line-height:24px;font-weight:500}.activity-detail{margin:6px 0 12px 28px;min-width:0}.activity-detail pre{overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0;max-width:100%;max-height:none;font-size:12px;padding:8px;background:var(--bg-secondary, #8881);border-radius:6px}.activity-command,.activity-output,.activity-arguments{position:relative;min-width:0}.activity-command .diff-copy{float:right;position:relative}.activity-facts,.activity-note{font-size:12px;opacity:.75;min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}.activity-todos{font-size:13px;padding-left:20px;overflow-wrap:anywhere}.activity-todos span{font-size:11px;opacity:.7}.tool-activity .diff-card{overflow:visible;min-width:0}.tool-activity .diff-body{grid-template-columns:minmax(0,1fr);overflow:visible;min-width:0}.tool-activity .diff-line{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;min-width:0}.tool-activity[data-state=failed]>.official-title{color:var(--danger, #c33)}@media(max-width:600px){.activity-status{width:100%;padding-left:28px}.activity-detail{margin-left:12px}}.composer-activity{display:flex;align-items:center;gap:8px;min-width:0;margin:0 10px 8px;color:#8d8d93;font-size:13px}.composer-activity svg{width:14px;height:14px;flex:0 0 14px}.composer-activity-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@supports (background-clip: text){.composer-activity[data-moving=true] .composer-activity-text{background:linear-gradient(110deg,#8d8d93 30%,#fafafa,#8d8d93 62%);background-size:240% 100%;background-clip:text;-webkit-background-clip:text;color:transparent;animation:composer-sweep 2.8s ease-in-out infinite}}@keyframes composer-sweep{0%{background-position:180% 0}to{background-position:-80% 0}}@media(prefers-reduced-motion:reduce){.composer-activity[data-moving=true] .composer-activity-text{animation:none;background:none;color:#8d8d93}}.image-preview-trigger{position:relative;display:inline-flex;vertical-align:top;max-width:min(100%,32rem);padding:0;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:transparent;cursor:zoom-in}.markdown .image-preview-thumbnail{display:block;width:auto;height:auto;max-width:100%;max-height:min(20rem,40vh);object-fit:contain}.image-preview-hint{position:absolute;bottom:4px;left:4px;right:4px;padding:3px 6px;border-radius:4px;background:#000b;color:#fff;font-size:11px;line-height:1.4;text-align:center}.image-preview-linked{display:inline-flex;flex-direction:column;align-items:flex-start;max-width:100%;gap:4px}.image-lightbox{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:16px;background:#000c;overscroll-behavior:contain}.image-lightbox-dialog{display:grid;grid-template-rows:auto minmax(0,1fr);width:min(100%,96rem);height:100%;max-height:calc(100dvh - 32px);min-width:0;min-height:0;overflow:hidden;border-radius:10px;color:#fff;background:#171717}.image-lightbox-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px}.image-lightbox-name{flex:1 1 8rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-lightbox-toolbar button{flex-shrink:0;border:1px solid #888;border-radius:6px;padding:7px 10px;background:#333;color:#fff;cursor:pointer}.image-lightbox-stage{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}.image-lightbox-stage img{display:block;flex:0 1 auto;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}.image-lightbox-stage.original{display:block}.image-lightbox-stage.original img{max-width:none;max-height:none}.image-preview-trigger:focus-visible,.image-lightbox button:focus-visible,.image-lightbox-stage:focus-visible{outline:2px solid #66bfff;outline-offset:2px}@media(max-width:600px){.image-lightbox{padding:6px}.image-lightbox-dialog{max-height:calc(100dvh - 12px)}.markdown .image-preview-thumbnail{max-height:min(16rem,35vh)}}.image-unavailable{display:inline-flex;flex-direction:column;align-items:flex-start;gap:6px;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;color:var(--secondary);overflow-wrap:anywhere}.image-unavailable button{padding:5px 10px;border:1px solid var(--line-strong);border-radius:6px;background:var(--bg);color:var(--ink)}