dsh-claude-style 0.2.2

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/lib/client.js ADDED
@@ -0,0 +1,3559 @@
1
+ /**
2
+ * Claude Style — Claude Code Desktop theme for the DeepSeek Harness web GUI.
3
+ *
4
+ * GENERATED FILE — do not edit. Source lives in src/ (JS zones as fragments,
5
+ * stylesheets as plain CSS); `node scripts/build.mjs` assembles this bundle.
6
+ * - src/constants.js Zone 1: Constants & Tokens
7
+ * - src/styles/*.css Zone 2: Stylesheets (tokens, typography, chrome,
8
+ * composer, sidebar, components)
9
+ * - src/context.js Zone 3: DSH Context & Helpers
10
+ * - src/overrides.js Zone 4+5: UI Overrides, Scheduler & Teardown
11
+ * - src/settings.js Settings Section (Brand)
12
+ * - src/entry.js Zone 6: Plugin Entry & Export
13
+ */
14
+ window.__ModuleLoader__.load({
15
+ id: 'dsh-claude-style',
16
+ factory: (require) => {
17
+ 'use strict'
18
+ var module = { exports: {} }
19
+ var exports = module.exports
20
+
21
+ // React is resolved through the module loader's graph, so the settings
22
+ // section can be a real component without a host half.
23
+ var React = require('react')
24
+
25
+ // ============================================================================
26
+ // Zone 1: 常量与配置定义 (Constants & Tokens)
27
+ // ============================================================================
28
+ var STYLE_ID = 'dsh-claude-style-style'
29
+
30
+ var COMPOSER_HINT = 'How can I help you today?'
31
+
32
+ /** English weekday names, indexed by Date#getDay() (0 = Sunday). */
33
+ var WEEKDAY_NAMES = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
34
+
35
+ /**
36
+ * Time-of-day hero greeting, à la Claude Code's rotating welcomes. Slots
37
+ * cover all 24 hours; the eight o'clock slot salutes the current weekday
38
+ * instead ("Happy Monday."). `username` fills the Good morning slot.
39
+ */
40
+ function pickHeroGreeting(username) {
41
+ var now = new Date()
42
+ var hour = now.getHours()
43
+ if (hour >= 6 && hour < 8) return 'Good morning, ' + (username || 'User') + '!'
44
+ if (hour >= 8 && hour < 9) return 'Happy ' + WEEKDAY_NAMES[now.getDay()] + '.'
45
+ if (hour >= 9 && hour < 12) return 'What are you working on?'
46
+ if (hour >= 12 && hour < 14) return 'What’s on the agenda today?'
47
+ if (hour >= 14 && hour < 18) return 'Coffee and Claude time?'
48
+ if (hour >= 18) return 'Evening, how are things?'
49
+ return 'You are here!'
50
+ }
51
+
52
+ /**
53
+ * Claude Code's 185 playful spinner verbs displayed while thinking / executing.
54
+ * Recreates the iconic CLI waiting experience in the DSH web interface.
55
+ */
56
+ var SPINNER_VERBS = [
57
+ // Cooking (22)
58
+ 'Baking', 'Blanching', 'Brewing', 'Caramelizing', 'Cooking', 'Fermenting', 'Flambeing', 'Frosting',
59
+ 'Garnishing', 'Infusing', 'Julienning', 'Kneading', 'Leavening', 'Marinating', 'Proofing', 'Sauteing',
60
+ 'Seasoning', 'Simmering', 'Stewing', 'Tempering', 'Whisking', 'Zesting',
61
+ // Thinking (21)
62
+ 'Cerebrating', 'Cogitating', 'Considering', 'Contemplating', 'Deciphering', 'Deliberating', 'Determining',
63
+ 'Envisioning', 'Ideating', 'Imagining', 'Inferring', 'Mulling', 'Musing', 'Noodling', 'Perusing',
64
+ 'Philosophising', 'Pondering', 'Pontificating', 'Puzzling', 'Ruminating', 'Thinking',
65
+ // Dancing / Movement (20)
66
+ "Beboppin'", 'Boogieing', 'Frolicking', 'Gallivanting', 'Galloping', 'Grooving', 'Jitterbugging',
67
+ 'Meandering', 'Moonwalking', 'Moseying', 'Perambulating', 'Scampering', 'Scurrying', 'Shimmying',
68
+ 'Skedaddling', 'Slithering', 'Sock-hopping', 'Waddling', 'Wandering', 'Zigzagging',
69
+ // Playful (26)
70
+ 'Befuddling', 'Bloviating', 'Boondoggling', 'Booping', 'Canoodling', 'Combobulating', 'Dilly-dallying',
71
+ 'Discombobulating', 'Fiddle-faddling', 'Finagling', 'Flibbertigibbeting', 'Flummoxing', 'Honking',
72
+ 'Hullaballooing', 'Lollygagging', 'Puttering', 'Razzle-dazzling', 'Razzmatazzing', 'Recombobulating',
73
+ 'Schlepping', 'Shenaniganing', 'Smooshing', 'Tomfoolering', 'Topsy-turvying', 'Whatchamacalliting',
74
+ 'Wibbling',
75
+ // Science (12)
76
+ 'Crystallizing', 'Evaporating', 'Ionizing', 'Nebulizing', 'Nucleating', 'Osmosing', 'Photosynthesizing',
77
+ 'Pollinating', 'Precipitating', 'Quantumizing', 'Sublimating', 'Synthesizing',
78
+ // Nature (15)
79
+ 'Billowing', 'Cascading', 'Drizzling', 'Ebbing', 'Flowing', 'Fluttering', 'Germinating', 'Gusting',
80
+ 'Misting', 'Sprouting', 'Swirling', 'Swooping', 'Thundering', 'Undulating', 'Whirlpooling',
81
+ // Magic / Fantasy (12)
82
+ 'Channeling', 'Channelling', 'Enchanting', 'Hyperspacing', 'Levitating', 'Manifesting', 'Metamorphosing',
83
+ 'Orbiting', 'Prestidigitating', 'Transfiguring', 'Transmuting', 'Warping',
84
+ // Productive / Work (25)
85
+ 'Accomplishing', 'Actioning', 'Actualizing', 'Architecting', 'Bootstrapping', 'Calculating', 'Churning',
86
+ 'Composing', 'Computing', 'Concocting', 'Crafting', 'Creating', 'Crunching', 'Doing', 'Effecting',
87
+ 'Elucidating', 'Forging', 'Forming', 'Generating', 'Hashing', 'Hatching', 'Orchestrating', 'Processing',
88
+ 'Working', 'Wrangling',
89
+ // Creative (8)
90
+ 'Choreographing', 'Cultivating', 'Doodling', 'Embellishing', 'Harmonizing', 'Improvising', 'Sketching',
91
+ 'Tinkering',
92
+ // Animal (6)
93
+ 'Burrowing', 'Herding', 'Nesting', 'Pouncing', 'Roosting', 'Symbioting',
94
+ // Claude specific (3)
95
+ 'Clauding', 'Gitifying', 'Reticulating',
96
+ // Other (13)
97
+ 'Beaming', 'Catapulting', 'Coalescing', 'Incubating', 'Mustering', 'Newspapering', 'Propagating',
98
+ 'Spinning', 'Twisting', 'Unfurling', 'Unravelling', 'Vibing', 'Whirring'
99
+ ]
100
+
101
+ /** Anthropic's starburst mark as an inline data URI, keeping the skin a single-file bundle with no asset request. */
102
+ var ANTHROPIC_MARK = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z' fill='%23D97757'/%3E%3C/svg%3E\")"
103
+
104
+ /** Segment label and the shipped /permission preset it selects. */
105
+ var PERMISSION_SEGMENTS = [
106
+ { label: 'Read', preset: 'read-only' },
107
+ { label: 'Edit', preset: 'workspace-write' },
108
+ { label: 'Auto', preset: 'danger-full-access' },
109
+ ]
110
+
111
+ /** In-conversation permission popover options matching Claude Code desktop style. */
112
+ var PERMISSION_OPTIONS = [
113
+ {
114
+ preset: 'read-only',
115
+ label: 'Read only',
116
+ desc: '仅读取文件与分析,不修改代码'
117
+ },
118
+ {
119
+ preset: 'workspace-write',
120
+ label: 'Accept edits',
121
+ desc: '允许编辑工作区文件'
122
+ },
123
+ {
124
+ preset: 'danger-full-access',
125
+ label: 'Full access',
126
+ desc: '自动执行,无需反复确认'
127
+ }
128
+ ]
129
+
130
+ /** The one preset the shipped UI gates behind its risk-confirmation dialog. */
131
+ var GATED_PRESET = 'danger-full-access'
132
+ /** Shipped full-access row labels, used to find that row in the shipped menu. */
133
+ var FULL_ACCESS_LABELS = ['完全权限', 'Full access']
134
+ /** Fallback prompt, used only when the shipped menu cannot be reached. */
135
+ var GATED_PROMPT = '启用完全权限(Auto)?\n\n智能体将减少确认步骤,可直接执行敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。'
136
+
137
+ /** Skin-owned class names, so nothing couples to hashed CSS-module classes. */
138
+ var SEGMENTS_CLASS = 'dsh-claude-segments'
139
+ var SEGMENT_CLASS = 'dsh-claude-segment'
140
+
141
+ /** Brand marks selectable from the settings page. `claude` is the default. */
142
+ var BRAND_CLAUDE = 'claude'
143
+ var BRAND_ANTHROPIC = 'anthropic'
144
+ var DEFAULT_BRAND = BRAND_CLAUDE
145
+ /** localStorage key holding the chosen brand. */
146
+ var BRAND_STORAGE_KEY = 'dsh-claude-style:brand'
147
+ /** The document attribute the stylesheet switches on. */
148
+ var BRAND_ATTR = 'data-dsh-claude-brand'
149
+
150
+ /**
151
+ * Claude's own brand lockup, taken from the official artwork (claude.ai via
152
+ * Wikimedia Commons, public domain as a simple geometric/text logo). The mark
153
+ * and the wordmark ship as two separate alpha masks so each can be sized
154
+ * independently: the sidebar pairs the starburst with the wordmark, while the
155
+ * new-conversation hero uses the starburst alone with the clay fill baked in.
156
+ *
157
+ * Two details are load-bearing:
158
+ * - The source paths live in the artwork's own coordinate space and are
159
+ * wrapped in a group transform, so every mask has to carry that same
160
+ * `translate` or the tight viewBox crops the geometry away entirely.
161
+ * - `#` and `'` stay percent-encoded inside the data URI. A literal `#`
162
+ * starts a fragment and truncates the URI at that point.
163
+ */
164
+ var CLAUDE_TRANSFORM = "translate(-75.96,-223.53)"
165
+ /** Tight viewBox of the starburst alone (148.09 x 148.18 user units). */
166
+ var CLAUDE_MARK_VIEWBOX = '0 0 148.09 148.18'
167
+ /** Tight viewBox of the wordmark alone, excluding the starburst. */
168
+ var CLAUDE_WORD_VIEWBOX = '177.76 14.09 512.22 121.54'
169
+ /** Aspect ratio of the wordmark, so callers can size it from the height. */
170
+ var CLAUDE_WORD_ASPECT = 512.22 / 121.54
171
+ /** Aspect ratio of the full mark+wordmark lockup. */
172
+ var CLAUDE_LOCKUP_ASPECT = 689.98 / 148.18
173
+
174
+ /** Starburst path, in the artwork's own (pre-transform) coordinates. */
175
+ var CLAUDE_MARK_PATH = 'm 105.01,322.07 29.14,-16.35 0.49,-1.42 -0.49,-0.79 h -1.42 l -4.87,-0.3 -16.65,-0.45 -14.44,-0.6 -13.99,-0.75 -3.52,-0.75 -3.3,-4.35 0.34,-2.17 2.96,-1.99 4.24,0.37 9.37,0.64 14.06,0.97 10.2,0.6 15.11,1.57 h 2.4 l 0.34,-0.97 -0.82,-0.6 -0.64,-0.6 -14.55,-9.86 -15.75,-10.42 -8.25,-6 -4.46,-3.04 -2.25,-2.85 -0.97,-6.22 4.05,-4.46 5.44,0.37 1.39,0.37 5.51,4.24 11.77,9.11 15.37,11.32 2.25,1.87 0.9,-0.64 0.11,-0.45 -1.01,-1.69 -8.36,-15.11 -8.92,-15.37 -3.97,-6.37 -1.05,-3.82 c -0.37,-1.57 -0.64,-2.89 -0.64,-4.5 l 4.61,-6.26 2.55,-0.82 6.15,0.82 2.59,2.25 3.82,8.74 6.19,13.76 9.6,18.71 2.81,5.55 1.5,5.14 0.56,1.57 h 0.97 v -0.9 l 0.79,-10.54 1.46,-12.94 1.42,-16.65 0.49,-4.69 2.32,-5.62 4.61,-3.04 3.6,1.72 2.96,4.24 -0.41,2.74 -1.76,11.44 -3.45,17.92 -2.25,12 h 1.31 l 1.5,-1.5 6.07,-8.06 10.2,-12.75 4.5,-5.06 5.25,-5.59 3.37,-2.66 h 6.37 l 4.69,6.97 -2.1,7.2 -6.56,8.32 -5.44,7.05 -7.8,10.5 -4.87,8.4 0.45,0.67 1.16,-0.11 17.62,-3.75 9.52,-1.72 11.36,-1.95 5.14,2.4 0.56,2.44 -2.02,4.99 -12.15,3 -14.25,2.85 -21.22,5.02 -0.26,0.19 0.3,0.37 9.56,0.9 4.09,0.22 h 10.01 l 18.64,1.39 4.87,3.22 2.92,3.94 -0.49,3 -7.5,3.82 -10.12,-2.4 -23.62,-5.62 -8.1,-2.02 h -1.12 v 0.67 l 6.75,6.6 12.37,11.17 15.49,14.4 0.79,3.56 -1.99,2.81 -2.1,-0.3 -13.61,-10.24 -5.25,-4.61 -11.89,-10.01 h -0.79 v 1.05 l 2.74,4.01 14.47,21.75 0.75,6.67 -1.05,2.17 -3.75,1.31 -4.12,-0.75 -8.47,-11.89 -8.74,-13.39 -7.05,-12 -0.86,0.49 -4.16,44.81 -1.95,2.29 -4.5,1.72 -3.75,-2.85 -1.99,-4.61 1.99,-9.11 2.4,-11.89 1.95,-9.45 1.76,-11.74 1.05,-3.9 -0.07,-0.26 -0.86,0.11 -8.85,12.15 -13.46,18.19 -10.65,11.4 -2.55,1.01 -4.42,-2.29 0.41,-4.09 2.47,-3.64 14.74,-18.75 8.89,-11.62 5.74,-6.71 -0.04,-0.97 h -0.34 l -39.15,25.42 -6.97,0.9 -3,-2.81 0.37,-4.61 1.42,-1.5 11.77,-8.1 -0.04,0.04 z'
176
+
177
+ /** Wordmark path, in the artwork's own (pre-transform) coordinates. */
178
+ var CLAUDE_WORD_PATH = 'm 317.73,349.33 c -18.82,0 -31.69,-10.5 -37.76,-26.66 -3.17,-8.42 -4.74,-17.36 -4.61,-26.36 0,-27.11 12.15,-45.94 39,-45.94 18.04,0 29.17,7.87 35.51,26.66 h 7.72 l -1.05,-25.91 c -10.8,-6.97 -24.3,-10.5 -40.72,-10.5 -23.14,0 -42.82,10.35 -53.77,29.02 -5.66,9.86 -8.53,21.07 -8.32,32.44 0,20.74 9.79,39.11 28.16,49.31 10.06,5.37 21.34,8.04 32.74,7.72 17.92,0 32.14,-3.41 44.74,-9.37 l 3.26,-28.57 h -7.87 c -4.72,13.05 -10.35,20.89 -19.69,25.05 -4.57,2.06 -10.35,3.11 -17.32,3.11 z m 81.18,-98.96 0.75,-12.75 h -5.32 l -23.7,7.12 v 3.86 l 10.5,4.87 v 89.17 c 0,6.07 -3.11,7.42 -11.25,8.44 v 6.52 h 40.31 v -6.52 c -8.17,-1.01 -11.25,-2.36 -11.25,-8.44 V 250.4 l -0.04,-0.04 z m 160.31,108.75 h 3.11 l 27.26,-5.17 v -6.67 l -3.82,-0.3 c -6.37,-0.6 -8.02,-1.91 -8.02,-7.12 v -47.55 l 0.75,-15.26 h -4.31 l -25.76,3.71 v 6.52 l 2.51,0.45 c 6.97,1.01 9.04,2.96 9.04,7.84 v 42.37 c -6.67,5.17 -13.05,8.44 -20.62,8.44 -8.4,0 -13.61,-4.27 -13.61,-14.25 v -39.79 l 0.75,-15.26 h -4.42 l -25.8,3.71 v 6.52 l 2.66,0.45 c 6.97,1.01 9.04,2.96 9.04,7.84 v 39.11 c 0,16.57 9.37,24.45 24.3,24.45 11.4,0 20.74,-6.07 27.75,-14.51 l -0.75,14.51 -0.04,-0.04 z M 484.3,306.36 c 0,-21.19 -11.25,-29.32 -31.57,-29.32 -17.92,0 -30.94,7.42 -30.94,19.72 0,3.67 1.31,6.49 3.97,8.44 l 13.65,-1.8 c -0.6,-4.12 -0.9,-6.64 -0.9,-7.69 0,-6.97 3.71,-10.5 11.25,-10.5 11.14,0 16.76,7.84 16.76,20.44 v 4.12 l -28.12,8.44 c -9.37,2.55 -14.7,4.76 -18.26,9.94 -1.89,3.17 -2.8,6.82 -2.62,10.5 0,12 8.25,20.47 22.35,20.47 10.2,0 19.24,-4.61 27.11,-13.35 2.81,8.74 7.12,13.35 14.81,13.35 6.22,0 11.85,-2.51 16.87,-7.42 l -1.5,-5.17 c -2.17,0.6 -4.27,0.9 -6.49,0.9 -4.31,0 -6.37,-3.41 -6.37,-10.09 v -30.97 z m -36,40.76 c -7.69,0 -12.45,-4.46 -12.45,-12.3 0,-5.32 2.51,-8.44 7.87,-10.24 l 22.8,-7.24 v 21.9 c -7.27,5.51 -11.55,7.87 -18.22,7.87 z m 237.36,6.82 v -6.67 l -3.86,-0.3 c -6.37,-0.6 -7.99,-1.91 -7.99,-7.12 v -89.47 l 0.75,-12.75 h -5.36 l -23.7,7.12 v 3.86 l 10.5,4.87 v 29.32 c -5.91,-4.05 -12.98,-6.08 -20.14,-5.77 -23.55,0 -41.92,17.92 -41.92,44.74 0,22.09 13.2,37.35 34.95,37.35 11.25,0 21.04,-5.47 27.11,-13.95 l -0.75,13.95 h 3.15 l 27.26,-5.17 v 0 z m -49.35,-68.02 c 11.25,0 19.69,6.52 19.69,18.52 v 33.75 c -5.18,5.16 -12.23,8 -19.54,7.87 -16.12,0 -24.3,-12.75 -24.3,-29.77 0,-19.12 9.34,-30.37 24.15,-30.37 z M 743.3,302.8 c -2.1,-9.9 -8.17,-15.52 -16.61,-15.52 -12.6,0 -21.34,9.49 -21.34,23.1 0,20.14 10.65,33.19 27.86,33.19 11.48,-0.12 22.04,-6.33 27.71,-16.31 l 5.02,1.35 c -2.25,17.47 -18.07,30.52 -37.5,30.52 -22.8,0 -38.51,-16.87 -38.51,-40.87 0,-24 17.06,-41.21 39.86,-41.21 17.02,0 29.02,10.24 32.89,28.01 l -59.4,18.22 v -8.02 l 40.01,-12.41 v -0.04 z'
179
+
180
+ /**
181
+ * Build a CSS `url()` for one Claude mask.
182
+ *
183
+ * `encodeURIComponent` does the escaping, which is why the paths above are kept
184
+ * as raw literals rather than pre-baked data URIs: every `#`, `'` and `<` gets
185
+ * escaped exactly once, so no fill colour can accidentally terminate the URI.
186
+ * `fill` defaults to `currentColor`, letting the mask follow the theme.
187
+ *
188
+ * @param viewBox - tight viewBox of the geometry being drawn.
189
+ * @param paths - one or more path `d` strings to include.
190
+ * @param fill - optional paint; omit for a currentColor alpha mask.
191
+ * @returns a quoted CSS url() value.
192
+ */
193
+ function claudeMask(viewBox, paths, fill) {
194
+ var body = ''
195
+ for (var i = 0; i < paths.length; i++) {
196
+ body += "<path" + (fill ? " fill='" + fill + "'" : '') + " d='" + paths[i] + "'/>"
197
+ }
198
+ var svg =
199
+ "<svg xmlns='http://www.w3.org/2000/svg' viewBox='" + viewBox + "'>" +
200
+ "<g transform='" + CLAUDE_TRANSFORM + "'>" + body + '</g></svg>'
201
+ return 'url("data:image/svg+xml,' + encodeURIComponent(svg) + '")'
202
+ }
203
+
204
+ /** The starburst alone, as a currentColor alpha mask. */
205
+ var CLAUDE_MARK = claudeMask(CLAUDE_MARK_VIEWBOX, [CLAUDE_MARK_PATH])
206
+ /** The wordmark alone, as a currentColor alpha mask. */
207
+ var CLAUDE_WORD = claudeMask(CLAUDE_WORD_VIEWBOX, [CLAUDE_WORD_PATH])
208
+ /** The full lockup (starburst + wordmark) as one currentColor alpha mask. */
209
+ var CLAUDE_LOCKUP = claudeMask('0 0 689.98 148.18', [CLAUDE_MARK_PATH, CLAUDE_WORD_PATH])
210
+ /** The starburst with the clay accent baked in, for the new-conversation hero. */
211
+ var CLAUDE_MARK_CLAY = claudeMask(CLAUDE_MARK_VIEWBOX, [CLAUDE_MARK_PATH], '#D97757')
212
+
213
+ /** Anthropic's A\ lockup mark (the alternate sidebar brand), as an alpha mask. */
214
+ var ANTHROPIC_BRAND_MARK = "url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 46 32%27%3E%3Cpath d=%27M32.73 0H25.7846L38.4499 32H45.3953L32.73 0Z%27/%3E%3Cpath d=%27M12.6653 0L0 32H7.08167L9.67193 25.28H22.9219L25.5122 32H32.5939L19.9286 0H12.6653ZM11.9626 19.3371L16.2969 8.09143L20.6313 19.3371H11.9626Z%27/%3E%3C/svg%3E\")"
215
+
216
+ /** The ANTHROPIC wordmark (the alternate sidebar brand), as an alpha mask. */
217
+ var ANTHROPIC_BRAND_WORD = "url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 143 16%27%3E%3Cpath transform=%27translate(18.299999237060547,0.27000001072883606)%27 d=%27 M10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 3.756195545196533,0 3.756195545196533,0 C3.756195545196533,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.2038140296936035,15.470022201538086 3.2038140296936035,15.470022201538086 C3.2038140296936035,15.470022201538086 3.2038140296936035,4.6410064697265625 3.2038140296936035,4.6410064697265625 C3.2038140296936035,4.6410064697265625 10.163809776306152,15.470022201538086 10.163809776306152,15.470022201538086 C10.163809776306152,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.716191291809082,0 10.716191291809082,0 C10.716191291809082,0 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777z%27/%3E%3Cpath transform=%27translate(34.869998931884766,0.27000001072883606)%27 d=%27 M0,2.983504056930542 C0,2.983504056930542 5.19273567199707,2.983504056930542 5.19273567199707,2.983504056930542 C5.19273567199707,2.983504056930542 5.19273567199707,15.470022201538086 5.19273567199707,15.470022201538086 C5.19273567199707,15.470022201538086 8.507256507873535,15.470022201538086 8.507256507873535,15.470022201538086 C8.507256507873535,15.470022201538086 8.507256507873535,2.983504056930542 8.507256507873535,2.983504056930542 C8.507256507873535,2.983504056930542 13.700006484985352,2.983504056930542 13.700006484985352,2.983504056930542 C13.700006484985352,2.983504056930542 13.700006484985352,0 13.700006484985352,0 C13.700006484985352,0 0,0 0,0 C0,0 0,2.983504056930542 0,2.983504056930542 C0,2.983504056930542 0,2.983504056930542 0,2.983504056930542z%27/%3E%3Cpath transform=%27translate(51.22999954223633,0.27000001072883606)%27 d=%27 M10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 3.3142902851104736,6.165900230407715 3.3142902851104736,6.165900230407715 C3.3142902851104736,6.165900230407715 3.3142902851104736,0 3.3142902851104736,0 C3.3142902851104736,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3142902851104736,15.470022201538086 3.3142902851104736,15.470022201538086 C3.3142902851104736,15.470022201538086 3.3142902851104736,9.149404525756836 3.3142902851104736,9.149404525756836 C3.3142902851104736,9.149404525756836 10.605714797973633,9.149404525756836 10.605714797973633,9.149404525756836 C10.605714797973633,9.149404525756836 10.605714797973633,15.470022201538086 10.605714797973633,15.470022201538086 C10.605714797973633,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.605714797973633,0 10.605714797973633,0 C10.605714797973633,0 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715z%27/%3E%3Cpath transform=%27translate(69.23999786376953,0.27000001072883606)%27 d=%27 M3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 7.403865814208984,2.983504056930542 7.403865814208984,2.983504056930542 C9.03934097290039,2.983504056930542 9.901290893554688,3.5801939964294434 9.901290893554688,4.707304000854492 C9.901290893554688,5.834399700164795 9.03934097290039,6.431103706359863 7.403865814208984,6.431103706359863 C7.403865814208984,6.431103706359863 3.3151700496673584,6.431103706359863 3.3151700496673584,6.431103706359863 C3.3151700496673584,6.431103706359863 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542z M13.216461181640625,4.707304000854492 C13.216461181640625,1.7900969982147217 11.072648048400879,0 7.558576583862305,0 C7.558576583862305,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3151700496673584,15.470022201538086 3.3151700496673584,15.470022201538086 C3.3151700496673584,15.470022201538086 3.3151700496673584,9.414593696594238 3.3151700496673584,9.414593696594238 C3.3151700496673584,9.414593696594238 7.005825519561768,9.414593696594238 7.005825519561768,9.414593696594238 C7.005825519561768,9.414593696594238 10.321218490600586,15.470022201538086 10.321218490600586,15.470022201538086 C10.321218490600586,15.470022201538086 13.990056991577148,15.470022201538086 13.990056991577148,15.470022201538086 C13.990056991577148,15.470022201538086 10.319005966186523,8.953378677368164 10.319005966186523,8.953378677368164 C12.161579132080078,8.245061874389648 13.216461181640625,6.753532409667969 13.216461181640625,4.707304000854492 C13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492z%27/%3E%3Cpath transform=%27translate(84.98999786376953,0)%27 d=%27 M7.622087478637695,12.906073570251465 C5.015110492706299,12.906073570251465 3.4244225025177,11.049725532531738 3.4244225025177,8.022093772888184 C3.4244225025177,4.95027494430542 5.015110492706299,3.0939269065856934 7.622087478637695,3.0939269065856934 C10.206976890563965,3.0939269065856934 11.775577545166016,4.95027494430542 11.775577545166016,8.022093772888184 C11.775577545166016,11.049725532531738 10.206976890563965,12.906073570251465 7.622087478637695,12.906073570251465 C7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465z M7.622087478637695,0 C3.1593029499053955,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1593029499053955,16 7.622087478637695,16 C12.062784194946289,16 15.200028419494629,12.685078620910645 15.200028419494629,8.022093772888184 C15.200028419494629,3.3149218559265137 12.062784194946289,0 7.622087478637695,0 C7.622087478637695,0 7.622087478637695,0 7.622087478637695,0z%27/%3E%3Cpath transform=%27translate(103.29000091552734,0.27000001072883606)%27 d=%27 M7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 3.3160574436187744,6.873104095458984 3.3160574436187744,6.873104095458984 C3.3160574436187744,6.873104095458984 3.3160574436187744,2.983504056930542 3.3160574436187744,2.983504056930542 C3.3160574436187744,2.983504056930542 7.405848026275635,2.983504056930542 7.405848026275635,2.983504056930542 C9.04176139831543,2.983504056930542 9.90394115447998,3.646505117416382 9.90394115447998,4.928304195404053 C9.90394115447998,6.2101030349731445 9.04176139831543,6.873104095458984 7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984z M7.5605998039245605,0 C7.5605998039245605,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3160574436187744,15.470022201538086 3.3160574436187744,15.470022201538086 C3.3160574436187744,15.470022201538086 3.3160574436187744,9.85659408569336 3.3160574436187744,9.85659408569336 C3.3160574436187744,9.85659408569336 7.5605998039245605,9.85659408569336 7.5605998039245605,9.85659408569336 C11.07561206817627,9.85659408569336 13.219999313354492,8.000200271606445 13.219999313354492,4.928304195404053 C13.219999313354492,1.8563942909240723 11.07561206817627,0 7.5605998039245605,0 C7.5605998039245605,0 7.5605998039245605,0 7.5605998039245605,0z%27/%3E%3Cpath transform=%27translate(128.0399932861328,0)%27 d=%27 M10.914844512939453,10.5414400100708 C10.340370178222656,12.044201850891113 9.191434860229492,12.906073570251465 7.622706890106201,12.906073570251465 C5.0155181884765625,12.906073570251465 3.4246866703033447,11.049725532531738 3.4246866703033447,8.022093772888184 C3.4246866703033447,4.95027494430542 5.0155181884765625,3.0939269065856934 7.622706890106201,3.0939269065856934 C9.191434860229492,3.0939269065856934 10.340370178222656,3.9557981491088867 10.914844512939453,5.458559989929199 C10.914844512939453,5.458559989929199 14.427860260009766,5.458559989929199 14.427860260009766,5.458559989929199 C13.566211700439453,2.1436522006988525 10.981111526489258,0 7.622706890106201,0 C3.1595458984375,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1595458984375,16 7.622706890106201,16 C11.003214836120605,16 13.588300704956055,13.834254264831543 14.449976921081543,10.5414400100708 C14.449976921081543,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 C10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708z%27/%3E%3Cpath transform=%27translate(117.83000183105469,0.27000001072883606)%27 d=%27 M0,0 C0,0 6.1677093505859375,15.470022201538086 6.1677093505859375,15.470022201538086 C6.1677093505859375,15.470022201538086 9.550004005432129,15.470022201538086 9.550004005432129,15.470022201538086 C9.550004005432129,15.470022201538086 3.382294178009033,0 3.382294178009033,0 C3.382294178009033,0 0,0 0,0 C0,0 0,0 0,0z%27/%3E%3Cpath transform=%27translate(0,0.27000001072883606)%27 d=%27 M5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 7.93500280380249,3.911694288253784 7.93500280380249,3.911694288253784 C7.93500280380249,3.911694288253784 10.045400619506836,9.348296165466309 10.045400619506836,9.348296165466309 C10.045400619506836,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309z M6.166755199432373,0 C6.166755199432373,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.4480772018432617,15.470022201538086 3.4480772018432617,15.470022201538086 C3.4480772018432617,15.470022201538086 4.709278583526611,12.22130012512207 4.709278583526611,12.22130012512207 C4.709278583526611,12.22130012512207 11.16093635559082,12.22130012512207 11.16093635559082,12.22130012512207 C11.16093635559082,12.22130012512207 12.421928405761719,15.470022201538086 12.421928405761719,15.470022201538086 C12.421928405761719,15.470022201538086 15.87000560760498,15.470022201538086 15.87000560760498,15.470022201538086 C15.87000560760498,15.470022201538086 9.703250885009766,0 9.703250885009766,0 C9.703250885009766,0 6.166755199432373,0 6.166755199432373,0 C6.166755199432373,0 6.166755199432373,0 6.166755199432373,0z%27/%3E%3C/svg%3E\")"
218
+
219
+
220
+ var SANS = "'Anthropic Sans Web Text','Noto Sans SC','Source Han Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif"
221
+ var SERIF = "'Anthropic Serif Web Text',Georgia,'Times New Roman','Noto Serif SC','Source Han Serif SC','Songti SC','SimSun',serif"
222
+ var MONO = "'Anthropic Mono Variable',ui-monospace,'SF Mono','JetBrains Mono','Fira Code',Consolas,'Liberation Mono',Menlo,Courier,monospace"
223
+
224
+ // ============================================================================
225
+ // Zone 2: 样式表(由 src/styles/*.css 内联生成,勿手改) (CSS Stylesheet)
226
+ // ============================================================================
227
+ var CSS = [
228
+ "/* --- 2.1 Design Tokens (Dark Base & Light Overrides) --- */",
229
+ "/* ---------- design tokens: warm-black (dark) base ---------- */",
230
+ "body[data-dsh-claude-style] {",
231
+ " --dsw-font-family: 'Anthropic Sans Web Text','Noto Sans SC','Source Han Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Hiragino Sans GB','Microsoft YaHei','Helvetica Neue',Helvetica,Arial,sans-serif;",
232
+ " --dsw-font-serif: 'Anthropic Serif Web Text',Georgia,'Times New Roman','Noto Serif SC','Source Han Serif SC','Songti SC','SimSun',serif;",
233
+ " --dsw-font-code: 'Anthropic Mono Variable',ui-monospace,'SF Mono','JetBrains Mono','Fira Code',Consolas,'Liberation Mono',Menlo,Courier,monospace;",
234
+ " --dsw-font-markdown-h1-font-family: var(--dsw-font-serif);",
235
+ " --dsw-font-markdown-h2-font-family: var(--dsw-font-serif);",
236
+ " --dsw-font-markdown-h3-font-family: var(--dsw-font-serif);",
237
+ " --dsw-font-markdown-h4-font-family: var(--dsw-font-serif);",
238
+ " --dsw-font-markdown-base-font-family: var(--dsw-font-family);",
239
+ " --dsw-font-markdown-small-font-family: var(--dsw-font-family);",
240
+ " --dsw-font-markdown-table-font-family: var(--dsw-font-family);",
241
+ " --dsw-alias-bg-base: #141413;",
242
+ " --dsw-alias-bg-layer-1: #1c1b1a;",
243
+ " --dsw-alias-bg-layer-2: #242320;",
244
+ " --dsw-alias-bg-layer-3: #2e2c29;",
245
+ " --dsw-alias-bg-overlay: #242320;",
246
+ " --dsw-alias-border-l1: #242320;",
247
+ " --dsw-alias-border-l2: #2e2c29;",
248
+ " --dsw-alias-border-l3: #3a3833;",
249
+ " --dsw-alias-brand-primary: #d97757;",
250
+ " --dsw-alias-brand-text: #faf9f5;",
251
+ " --dsw-alias-button-elevated-fill: #242320;",
252
+ " --dsw-alias-button-floating-fill: #242320;",
253
+ " --dsw-alias-button-floating-hover: #2e2c29;",
254
+ " --dsw-alias-button-info-fill: #d97757;",
255
+ " --dsw-alias-button-info-hover: #e08a6d;",
256
+ " --dsw-alias-interactive-bg-active: rgba(217, 119, 87, 0.30);",
257
+ " --dsh-claude-hover-bg: rgba(255, 255, 255, 0.08);",
258
+ " --dsw-alias-interactive-bg-hover: var(--dsh-claude-hover-bg);",
259
+ " --dsw-alias-interactive-bg-hover-solid: #2e2c29;",
260
+ " --dsw-alias-label-primary: #faf9f5;",
261
+ " --dsw-alias-label-primary-bluish: #faf9f5;",
262
+ " --dsw-alias-label-secondary: #b0aea5;",
263
+ " --dsw-alias-label-tertiary: #8f8d84;",
264
+ " --dsw-alias-label-caption: #6b6a65;",
265
+ " --dsw-alias-state-business-primary: #d97757;",
266
+ " --dsw-alias-state-business-tertiary: #3a2a22;",
267
+ " --dsw-shadow-lv2: 0 4px 16px rgba(0, 0, 0, 0.30), 0 1px 3px rgba(0, 0, 0, 0.14);",
268
+ " --dsw-specific-input-major: #0f0e0d;",
269
+ " --dsw-specific-selector: #2e2c29;",
270
+ " --dsw-specific-sidebar-fill: #141413;",
271
+ "}",
272
+ "",
273
+ "/* ================= light variant: ivory editorial ================= */",
274
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) {",
275
+ " --dsw-alias-bg-base: #fcfcfb;",
276
+ " --dsw-alias-bg-layer-1: #f5f3ee;",
277
+ " --dsw-alias-bg-layer-2: #f0eee6;",
278
+ " --dsw-alias-bg-layer-3: #e8e6dc;",
279
+ " --dsw-alias-bg-overlay: #ffffff;",
280
+ " --dsw-alias-border-l1: #e8e6dc;",
281
+ " --dsw-alias-border-l2: #dedcd2;",
282
+ " --dsw-alias-border-l3: #d0cdc1;",
283
+ " --dsw-alias-brand-primary: #d97757;",
284
+ " --dsw-alias-button-info-fill: #d97757;",
285
+ " --dsw-alias-button-info-hover: #c6613f;",
286
+ " --dsw-alias-button-floating-fill: #ffffff;",
287
+ " --dsw-alias-button-floating-hover: #ffffff;",
288
+ " --dsw-alias-label-primary: #141413;",
289
+ " --dsw-alias-label-primary-bluish: #141413;",
290
+ " --dsw-alias-label-secondary: #6e6a60;",
291
+ " --dsw-alias-label-tertiary: #8f8a7e;",
292
+ " --dsw-alias-label-caption: #a6a094;",
293
+ " --dsw-alias-state-business-primary: #d97757;",
294
+ " --dsw-alias-state-business-tertiary: #e9dfd2;",
295
+ " --dsw-specific-input-major: #ffffff;",
296
+ " --dsw-specific-menu: #ffffff;",
297
+ " --dsw-specific-selector: #f0eee6;",
298
+ " --dsw-specific-sidebar-fill: #fbfbf9;",
299
+ " --dsh-claude-hover-bg: rgba(0, 0, 0, 0.08);",
300
+ " --dsw-alias-interactive-bg-hover: var(--dsh-claude-hover-bg);",
301
+ " --dsw-shadow-lv2: 0 4px 18px rgba(20, 20, 19, 0.10), 0 1px 3px rgba(20, 20, 19, 0.05);",
302
+ "}",
303
+ "",
304
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) {",
305
+ " color: #141413;",
306
+ " background-color: #fcfcfb !important;",
307
+ "}",
308
+ "",
309
+ "html:has(body[data-dsh-claude-style]:not([data-ds-dark-theme])),",
310
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) #root {",
311
+ " background-color: #fcfcfb !important;",
312
+ "}",
313
+ "",
314
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is([data-pane=\"sidebar\"], [class*=\"sidebarCol\"], .dshDesktopSidebarSurface) {",
315
+ " --dsw-specific-sidebar-fill: #fbfbf9 !important;",
316
+ " background: #fbfbf9 !important;",
317
+ " border-right: 1px solid #e8e6dc !important;",
318
+ "}",
319
+ "",
320
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is([data-pane=\"conversation\"], [class*=\"centerCol\"]) {",
321
+ " background: #fcfcfb !important;",
322
+ "}",
323
+ "",
324
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) a {",
325
+ " color: #c6613f;",
326
+ "}",
327
+ "",
328
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) a:hover {",
329
+ " color: #a94f2f;",
330
+ "}",
331
+ "",
332
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"_brand\"],",
333
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"_primary\"],",
334
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-slot=\"sidebar.settings\"] > :is(button, [role=\"button\"]) {",
335
+ " background: #d97757;",
336
+ " color: #ffffff;",
337
+ "}",
338
+ "",
339
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"_brand\"]:hover,",
340
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"_primary\"]:hover,",
341
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-slot=\"sidebar.settings\"] > :is(button, [role=\"button\"]):hover {",
342
+ " background: #c6613f;",
343
+ "}",
344
+ "",
345
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) blockquote {",
346
+ " color: #6e6a60;",
347
+ " border-left-color: #c6613f;",
348
+ " background: rgba(198, 97, 63, 0.05);",
349
+ "}",
350
+ "",
351
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) pre {",
352
+ " background: #f5f3ee;",
353
+ " border-color: #e8e6dc;",
354
+ "}",
355
+ "",
356
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) code:not(pre code) {",
357
+ " background: #e8e6dc;",
358
+ "}",
359
+ "",
360
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) table th {",
361
+ " background: #f0eee6;",
362
+ "}",
363
+ "",
364
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) * {",
365
+ " scrollbar-color: rgba(208, 205, 193, 0.9) transparent;",
366
+ "}",
367
+ "",
368
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) ::-webkit-scrollbar-thumb {",
369
+ " background: rgba(208, 205, 193, 0.9);",
370
+ "}",
371
+ "",
372
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) ::-webkit-scrollbar-thumb:hover {",
373
+ " background: rgba(143, 138, 126, 0.8);",
374
+ "}",
375
+ "",
376
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) ::selection {",
377
+ " background: rgba(217, 119, 87, 0.22);",
378
+ "}",
379
+ "",
380
+ "/* --- 2.2 Typography & Markdown Editorial --- */",
381
+ "/* ---------- typography: serif display + sans UI + mono code ---------- */",
382
+ "body[data-dsh-claude-style] {",
383
+ " font-family: var(--dsw-font-family);",
384
+ " color: #faf9f5;",
385
+ " background-color: #141413;",
386
+ "}",
387
+ "",
388
+ "body[data-dsh-claude-style] :is(h1, h2, h3, h4, [class*=\"headline\"], [class*=\"title\"]) {",
389
+ " font-family: var(--dsw-font-serif);",
390
+ " font-weight: 500;",
391
+ " letter-spacing: -0.01em;",
392
+ " line-height: 1.25;",
393
+ "}",
394
+ "",
395
+ "/* display headings sit at 500; the new-conversation headline drops one step",
396
+ " further to 400, and both keep the tighter display tracking */",
397
+ "body[data-dsh-claude-style] :is(h1, [class*=\"headline\"]) {",
398
+ " font-weight: 500;",
399
+ " letter-spacing: -0.015em;",
400
+ "}",
401
+ "",
402
+ "body[data-dsh-claude-style] :is(pre, code, kbd, samp, [class*=\"mono\"], [class*=\"codeBlock\"], [class*=\"CodeBlock\"]) {",
403
+ " font-family: var(--dsw-font-code);",
404
+ "}",
405
+ "",
406
+ "/* editorial captions */",
407
+ "body[data-dsh-claude-style] :is([class*=\"caption\"], [class*=\"sectionLabel\"]) {",
408
+ " font-size: 12px;",
409
+ " font-weight: 500;",
410
+ "}",
411
+ "",
412
+ "/* ---------- editorial markdown ---------- */",
413
+ "body[data-dsh-claude-style] blockquote {",
414
+ " font-family: var(--dsw-font-serif);",
415
+ " font-style: italic;",
416
+ " color: #b0aea5;",
417
+ " border-left: 2px solid #d97757;",
418
+ " background: rgba(217, 119, 87, 0.06);",
419
+ " border-radius: 0 8px 8px 0;",
420
+ " padding: 0.6em 1em;",
421
+ "}",
422
+ "",
423
+ "body[data-dsh-claude-style] pre {",
424
+ " background: #1c1b1a;",
425
+ " border: 1px solid #242320;",
426
+ " border-radius: 8px;",
427
+ "}",
428
+ "",
429
+ "body[data-dsh-claude-style] code:not(pre code) {",
430
+ " background: #2e2c29;",
431
+ " border-radius: 4px;",
432
+ " padding: 0.15em 0.4em;",
433
+ " font-size: 0.88em;",
434
+ "}",
435
+ "",
436
+ "body[data-dsh-claude-style] hr {",
437
+ " border: none;",
438
+ " border-top: 1px solid rgba(20, 20, 19, 0.14);",
439
+ " margin: 1.6em 0;",
440
+ "}",
441
+ "",
442
+ "body[data-dsh-claude-style] table {",
443
+ " border-collapse: collapse;",
444
+ " font-size: 0.92em;",
445
+ " width: 100%;",
446
+ "}",
447
+ "",
448
+ "body[data-dsh-claude-style] table th {",
449
+ " background: rgba(250, 249, 245, 0.06);",
450
+ " font-weight: 600;",
451
+ " text-align: left;",
452
+ "}",
453
+ "",
454
+ "body[data-dsh-claude-style] table td, body[data-dsh-claude-style] table th {",
455
+ " border: none;",
456
+ " border-bottom: 1px solid rgba(20, 20, 19, 0.12);",
457
+ " padding: 0.6em 0.85em !important;",
458
+ "}",
459
+ "",
460
+ "/* tabs: subtle editorial weighting */",
461
+ "body[data-dsh-claude-style] [role=\"tab\"] {",
462
+ " font-weight: 500;",
463
+ "}",
464
+ "",
465
+ "/* technical meta (model selector, triggers) read as mono labels */",
466
+ "body[data-dsh-claude-style] [class*=\"triggerLabel\"],",
467
+ "body[data-dsh-claude-style] [class*=\"selectLabel\"],",
468
+ "body[data-dsh-claude-style] [class*=\"monoLabel\"] {",
469
+ " font-family: var(--dsw-font-code);",
470
+ " font-size: 12px;",
471
+ " letter-spacing: 0;",
472
+ "}",
473
+ "",
474
+ "/* --- 2.3 Host Chrome Restyling (Sidebar, Composer, Buttons) --- */",
475
+ "/* ---------- canvas + hairline structure ---------- */",
476
+ "body[data-dsh-claude-style] :is([data-pane=\"sidebar\"], [class*=\"sidebarCol\"], .dshDesktopSidebarSurface) {",
477
+ " --dsw-specific-sidebar-fill: #141413 !important;",
478
+ " background: #141413 !important;",
479
+ " border-right: 1px solid #242320 !important;",
480
+ "}",
481
+ "",
482
+ "body[data-dsh-claude-style] :is([data-pane=\"conversation\"], [class*=\"centerCol\"]) {",
483
+ " background: #141413;",
484
+ "}",
485
+ "",
486
+ "/* ---------- clay accent: one emphasis color, disciplined ---------- */",
487
+ "body[data-dsh-claude-style] a {",
488
+ " color: #e08a6d;",
489
+ "}",
490
+ "",
491
+ "body[data-dsh-claude-style] a:hover {",
492
+ " color: #f0a488;",
493
+ "}",
494
+ "",
495
+ "body[data-dsh-claude-style] button[class*=\"brand\"] {",
496
+ " color: #d97757;",
497
+ "}",
498
+ "",
499
+ "/* The baked-in wordmark \"HARNESS\" badge (a pill rect + its letter paths)",
500
+ " looks crowded next to the whale + wordmark. Hide the badge entirely so",
501
+ " the brand reads as a clean whale + wordmark on the clay pill. */",
502
+ "body[data-dsh-claude-style] button[class*=\"brand\"] rect[fill=\"currentColor\"],",
503
+ "body[data-dsh-claude-style] button[class*=\"brand\"] path[fill*=\"label-primary-inverted\"] {",
504
+ " display: none;",
505
+ "}",
506
+ "",
507
+ "/* pill CTAs: send + settings sidebar actions */",
508
+ "body[data-dsh-claude-style] button[class*=\"_brand\"],",
509
+ "body[data-dsh-claude-style] button[class*=\"_primary\"],",
510
+ "body[data-dsh-claude-style] [data-slot=\"sidebar.settings\"] > :is(button, [role=\"button\"]) {",
511
+ " border-radius: 9999px;",
512
+ " background: #d97757;",
513
+ " color: #ffffff;",
514
+ " font-weight: 500;",
515
+ "}",
516
+ "",
517
+ "body[data-dsh-claude-style] button[class*=\"_brand\"]:hover,",
518
+ "body[data-dsh-claude-style] button[class*=\"_primary\"]:hover,",
519
+ "body[data-dsh-claude-style] [data-slot=\"sidebar.settings\"] > :is(button, [role=\"button\"]):hover {",
520
+ " background: #e08a6d;",
521
+ "}",
522
+ "",
523
+ "/* Brand logo chip: drop the loud clay pill so the mark + wordmark sit on",
524
+ " the canvas. That pill also carried a 9999px radius, and together with the",
525
+ " button overflow:hidden its arc clipped the leading edge of the mark — so",
526
+ " the radius goes as well. Adaptive logo color: espresso on light, ivory",
527
+ " on dark. */",
528
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"brand\"],",
529
+ "body[data-dsh-claude-style][data-ds-dark-theme] button[class*=\"brand\"] {",
530
+ " background: transparent !important;",
531
+ " border: none;",
532
+ " border-radius: 0;",
533
+ "}",
534
+ "",
535
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) button[class*=\"brand\"] {",
536
+ " color: #141413 !important;",
537
+ "}",
538
+ "",
539
+ "body[data-dsh-claude-style][data-ds-dark-theme] button[class*=\"brand\"] {",
540
+ " color: #faf9f5 !important;",
541
+ "}",
542
+ "",
543
+ "/* badges: full pill */",
544
+ "body[data-dsh-claude-style] :is([class*=\"badge\"], [class*=\"Badge\"], [class*=\"tag\"], [class*=\"Tag\"]) {",
545
+ " border-radius: 9999px;",
546
+ "}",
547
+ "",
548
+ "/* ---------- chrome details ---------- */",
549
+ "body[data-dsh-claude-style] * {",
550
+ " scrollbar-width: thin;",
551
+ " scrollbar-color: rgba(58, 56, 51, 0.9) transparent;",
552
+ "}",
553
+ "",
554
+ "body[data-dsh-claude-style] ::-webkit-scrollbar {",
555
+ " width: 8px;",
556
+ " height: 8px;",
557
+ "}",
558
+ "",
559
+ "body[data-dsh-claude-style] ::-webkit-scrollbar-track {",
560
+ " background: transparent;",
561
+ "}",
562
+ "",
563
+ "body[data-dsh-claude-style] ::-webkit-scrollbar-thumb {",
564
+ " background: rgba(58, 56, 51, 0.9);",
565
+ " border-radius: 9999px;",
566
+ "}",
567
+ "",
568
+ "body[data-dsh-claude-style] ::-webkit-scrollbar-thumb:hover {",
569
+ " background: rgba(107, 106, 101, 0.9);",
570
+ "}",
571
+ "",
572
+ "body[data-dsh-claude-style] ::selection {",
573
+ " background: rgba(217, 119, 87, 0.30);",
574
+ " color: inherit;",
575
+ "}",
576
+ "",
577
+ "body[data-dsh-claude-style] :is(button, input, textarea, select, [role=\"button\"], [role=\"tab\"], [role=\"treeitem\"]) {",
578
+ " outline: none;",
579
+ "}",
580
+ "",
581
+ "/* Keyboard focus ring: neutral, in the input box's own shadow colour",
582
+ " (espresso #141413 in light, black in dark) instead of the clay accent. */",
583
+ "body[data-dsh-claude-style] :is(button, input, textarea, select, [role=\"button\"], [role=\"tab\"], [role=\"treeitem\"]):focus-visible {",
584
+ " outline: 2px solid rgba(20, 20, 19, 0.45);",
585
+ " outline-offset: 1px;",
586
+ "}",
587
+ "",
588
+ "body[data-dsh-claude-style][data-ds-dark-theme] :is(button, input, textarea, select, [role=\"button\"], [role=\"tab\"], [role=\"treeitem\"]):focus-visible {",
589
+ " outline-color: rgba(0, 0, 0, 0.45);",
590
+ "}",
591
+ "",
592
+ "/* ---------- Claude Code layout: hero brand mark ---------- */",
593
+ "/* The new-conversation hero ships the DeepSeek fish; swap it for the selected",
594
+ " brand mark. Every child of the hitbox is hidden — the mark can sit behind a",
595
+ " slot wrapper, not always a bare svg — and the mark is painted on the hitbox,",
596
+ " so React keeps owning its own node. The hero keeps the clay fill in both",
597
+ " brands, matching the shipped accent treatment. */",
598
+ "body[data-dsh-claude-style] [class*=\"fishHitbox\"] > * {",
599
+ " display: none !important;",
600
+ "}",
601
+ "",
602
+ "body[data-dsh-claude-style] [class*=\"fishHitbox\"] svg {",
603
+ " display: none !important;",
604
+ "}",
605
+ "",
606
+ "body[data-dsh-claude-style] [class*=\"fishHitbox\"]::before {",
607
+ " content: \"\";",
608
+ " flex: none;",
609
+ " width: 42.5px;",
610
+ " height: 42.5px;",
611
+ " background-repeat: no-repeat;",
612
+ " background-position: center;",
613
+ " background-size: contain;",
614
+ "}",
615
+ "",
616
+ "body[data-dsh-claude-style]:not([data-dsh-claude-brand=\"anthropic\"]) [class*=\"fishHitbox\"]::before {",
617
+ " background-image: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20148.09%20148.18'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20fill%3D'%23D97757'%20d%3D'm%20105.01%2C322.07%2029.14%2C-16.35%200.49%2C-1.42%20-0.49%2C-0.79%20h%20-1.42%20l%20-4.87%2C-0.3%20-16.65%2C-0.45%20-14.44%2C-0.6%20-13.99%2C-0.75%20-3.52%2C-0.75%20-3.3%2C-4.35%200.34%2C-2.17%202.96%2C-1.99%204.24%2C0.37%209.37%2C0.64%2014.06%2C0.97%2010.2%2C0.6%2015.11%2C1.57%20h%202.4%20l%200.34%2C-0.97%20-0.82%2C-0.6%20-0.64%2C-0.6%20-14.55%2C-9.86%20-15.75%2C-10.42%20-8.25%2C-6%20-4.46%2C-3.04%20-2.25%2C-2.85%20-0.97%2C-6.22%204.05%2C-4.46%205.44%2C0.37%201.39%2C0.37%205.51%2C4.24%2011.77%2C9.11%2015.37%2C11.32%202.25%2C1.87%200.9%2C-0.64%200.11%2C-0.45%20-1.01%2C-1.69%20-8.36%2C-15.11%20-8.92%2C-15.37%20-3.97%2C-6.37%20-1.05%2C-3.82%20c%20-0.37%2C-1.57%20-0.64%2C-2.89%20-0.64%2C-4.5%20l%204.61%2C-6.26%202.55%2C-0.82%206.15%2C0.82%202.59%2C2.25%203.82%2C8.74%206.19%2C13.76%209.6%2C18.71%202.81%2C5.55%201.5%2C5.14%200.56%2C1.57%20h%200.97%20v%20-0.9%20l%200.79%2C-10.54%201.46%2C-12.94%201.42%2C-16.65%200.49%2C-4.69%202.32%2C-5.62%204.61%2C-3.04%203.6%2C1.72%202.96%2C4.24%20-0.41%2C2.74%20-1.76%2C11.44%20-3.45%2C17.92%20-2.25%2C12%20h%201.31%20l%201.5%2C-1.5%206.07%2C-8.06%2010.2%2C-12.75%204.5%2C-5.06%205.25%2C-5.59%203.37%2C-2.66%20h%206.37%20l%204.69%2C6.97%20-2.1%2C7.2%20-6.56%2C8.32%20-5.44%2C7.05%20-7.8%2C10.5%20-4.87%2C8.4%200.45%2C0.67%201.16%2C-0.11%2017.62%2C-3.75%209.52%2C-1.72%2011.36%2C-1.95%205.14%2C2.4%200.56%2C2.44%20-2.02%2C4.99%20-12.15%2C3%20-14.25%2C2.85%20-21.22%2C5.02%20-0.26%2C0.19%200.3%2C0.37%209.56%2C0.9%204.09%2C0.22%20h%2010.01%20l%2018.64%2C1.39%204.87%2C3.22%202.92%2C3.94%20-0.49%2C3%20-7.5%2C3.82%20-10.12%2C-2.4%20-23.62%2C-5.62%20-8.1%2C-2.02%20h%20-1.12%20v%200.67%20l%206.75%2C6.6%2012.37%2C11.17%2015.49%2C14.4%200.79%2C3.56%20-1.99%2C2.81%20-2.1%2C-0.3%20-13.61%2C-10.24%20-5.25%2C-4.61%20-11.89%2C-10.01%20h%20-0.79%20v%201.05%20l%202.74%2C4.01%2014.47%2C21.75%200.75%2C6.67%20-1.05%2C2.17%20-3.75%2C1.31%20-4.12%2C-0.75%20-8.47%2C-11.89%20-8.74%2C-13.39%20-7.05%2C-12%20-0.86%2C0.49%20-4.16%2C44.81%20-1.95%2C2.29%20-4.5%2C1.72%20-3.75%2C-2.85%20-1.99%2C-4.61%201.99%2C-9.11%202.4%2C-11.89%201.95%2C-9.45%201.76%2C-11.74%201.05%2C-3.9%20-0.07%2C-0.26%20-0.86%2C0.11%20-8.85%2C12.15%20-13.46%2C18.19%20-10.65%2C11.4%20-2.55%2C1.01%20-4.42%2C-2.29%200.41%2C-4.09%202.47%2C-3.64%2014.74%2C-18.75%208.89%2C-11.62%205.74%2C-6.71%20-0.04%2C-0.97%20h%20-0.34%20l%20-39.15%2C25.42%20-6.97%2C0.9%20-3%2C-2.81%200.37%2C-4.61%201.42%2C-1.5%2011.77%2C-8.1%20-0.04%2C0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\");",
618
+ "}",
619
+ "",
620
+ "body[data-dsh-claude-style][data-dsh-claude-brand=\"anthropic\"] [class*=\"fishHitbox\"]::before {",
621
+ " background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z' fill='%23D97757'/%3E%3C/svg%3E\");",
622
+ "}",
623
+ "",
624
+ "/* The preview badge has no Claude Code counterpart. */",
625
+ "body[data-dsh-claude-style] [class*=\"previewBadge\"] {",
626
+ " display: none !important;",
627
+ "}",
628
+ "",
629
+ "/* Headline: the shipped 26px/32px editorial display, then 15% back off that",
630
+ " (52 -> 44.2) and one weight step below the display rule. */",
631
+ "body[data-dsh-claude-style] [class*=\"headline\"]:has([class*=\"fishHitbox\"]) {",
632
+ " font-size: 44.2px;",
633
+ " line-height: 54.4px;",
634
+ " font-weight: 400;",
635
+ "}",
636
+ "",
637
+ "/* ---------- Claude Code layout: composer input + buttons ---------- */",
638
+ "/* The composer card is the input box: one step up in type size, pure white",
639
+ " so it separates from the canvas, and an outline 4px tighter than the",
640
+ " shipped 22px. */",
641
+ "body[data-dsh-claude-style] [data-composer-card] {",
642
+ " font-size: 15px;",
643
+ " border-radius: 18px;",
644
+ " border: 1px solid var(--dsw-alias-border-l1);",
645
+ " position: relative;",
646
+ " z-index: 2;",
647
+ " gap: 8px !important;",
648
+ " padding-bottom: 2px !important;",
649
+ " min-height: 0 !important;",
650
+ " height: auto !important;",
651
+ " transition: border-color 0.12s ease, box-shadow 0.12s ease;",
652
+ "}",
653
+ "",
654
+ "/* Input height, by composer variant. The hero (new conversation) keeps the",
655
+ " tall 86px field it was tuned to. An active conversation instead hugs its",
656
+ " draft: the shipped 36px floor holds exactly one line, the contenteditable",
657
+ " then grows a line at a time, and .scroll caps the box at",
658
+ " --dsh-composer-text-max-height before it starts scrolling. Both hooks are",
659
+ " ancestors of the field, so :is() also keeps the tall field through the",
660
+ " settling frame, while an active composer matches neither. */",
661
+ "body[data-dsh-claude-style] :is([class*=\"composerHero\"], [data-phase=\"hero\"]) [data-composer-input] {",
662
+ " min-height: 86px !important;",
663
+ "}",
664
+ "",
665
+ "body[data-dsh-claude-style] [data-composer-input] {",
666
+ " min-height: 36px !important;",
667
+ " height: auto !important;",
668
+ "}",
669
+ "",
670
+ "/* Tight bottom padding below the button controls row. The selector must",
671
+ " be `[class*=\"_row\"]`: a bare `[class*=\"row\"]` substring-matches the",
672
+ " shipped input growth wrapper `.p_FcLG_grow` (\"grow\" contains \"row\"),",
673
+ " which pins the composer field to the toolbar-row metrics. */",
674
+ "body[data-dsh-claude-style] [data-composer-card] [class*=\"_row\"] {",
675
+ " padding-bottom: 2px !important;",
676
+ "}",
677
+ "",
678
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card] {",
679
+ " background: #ffffff;",
680
+ " box-shadow: 0 4px 12px rgba(20, 20, 19, 0.04), 0 1px 3px rgba(20, 20, 19, 0.02);",
681
+ "}",
682
+ "",
683
+ "/* Focus: the shipped field has no focus face at all — only the caret moves —",
684
+ " so this adds one, in the input box's own shadow colour rather than the",
685
+ " accent: the hairline takes the drop-shadow tint (espresso in light, black",
686
+ " in dark), a 1px halo in the same tone hugs the edge, and the drop shadow",
687
+ " deepens. The tray below continues the same hairline, so its three edges",
688
+ " follow whenever the card above it holds focus. */",
689
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card]:focus-within {",
690
+ " border-color: rgba(20, 20, 19, 0.36);",
691
+ " box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.13), 0 6px 18px rgba(20, 20, 19, 0.06), 0 2px 6px rgba(20, 20, 19, 0.03);",
692
+ "}",
693
+ "",
694
+ "body[data-dsh-claude-style][data-ds-dark-theme] [data-composer-card]:focus-within {",
695
+ " border-color: rgba(0, 0, 0, 0.38);",
696
+ " box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.27);",
697
+ "}",
698
+ "",
699
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [class*=\"composerStack\"]:has([data-composer-card]:focus-within) > [class*=\"heroWorkspaceRow\"] {",
700
+ " border-color: rgba(20, 20, 19, 0.36);",
701
+ "}",
702
+ "",
703
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"composerStack\"]:has([data-composer-card]:focus-within) > [class*=\"heroWorkspaceRow\"] {",
704
+ " border-color: rgba(0, 0, 0, 0.38);",
705
+ "}",
706
+ "",
707
+ "/* The workspace-trigger variant paints its dashed ring through a masked svg",
708
+ " cut with rx=22; re-cut it so the ring tracks the 18px card. */",
709
+ "body[data-dsh-claude-style] [data-composer-card]:after {",
710
+ " border-radius: 18px;",
711
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27none%27 rx=%2718%27 ry=%2718%27 stroke=%27black%27 stroke-width=%272%27 stroke-dasharray=%274 4%27/%3E%3C/svg%3E\");",
712
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27none%27 rx=%2718%27 ry=%2718%27 stroke=%27black%27 stroke-width=%272%27 stroke-dasharray=%274 4%27/%3E%3C/svg%3E\");",
713
+ "}",
714
+ "",
715
+ "/* Commands and attach: 7px corners instead of the shipped full circle, no",
716
+ " resting fill, and a warm plate on hover. */",
717
+ "body[data-dsh-claude-style] :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"], button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]) {",
718
+ " border-radius: 7px;",
719
+ "}",
720
+ "",
721
+ "/* Send, and the stop/queue/steer labels that replace it while running: the",
722
+ " shipped 34px circle becomes a 7px rounded rectangle. */",
723
+ "body[data-dsh-claude-style] :is(button[aria-label=\"发送消息\"], button[aria-label=\"Send message\"], button[aria-label=\"排队发送\"], button[aria-label=\"Queue message\"], button[aria-label=\"插话发送\"], button[aria-label=\"Steer message\"], button[aria-label=\"停止生成\"], button[aria-label=\"Stop generating\"]) {",
724
+ " border-radius: 7px;",
725
+ "}",
726
+ "",
727
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"], button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]) {",
728
+ " background: transparent;",
729
+ "}",
730
+ "",
731
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"], button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]):hover:not(:disabled) {",
732
+ " background: #f6f6f4;",
733
+ "}",
734
+ "",
735
+ "/* Model selector: the same type size as the permission segments and the",
736
+ " same 7px corners; its chevron is dropped while the click target and the",
737
+ " menu it opens stay exactly as shipped. Its shipped hover token is only a",
738
+ " ~6% tint, so the hover plate matches the composer tool buttons. */",
739
+ "body[data-dsh-claude-style] [data-composer-card] [class*=\"trigger\"] {",
740
+ " font-size: 14px;",
741
+ " border-radius: 7px;",
742
+ "}",
743
+ "",
744
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card] [class*=\"trigger\"]:hover:not(:disabled) {",
745
+ " background: #f6f6f4;",
746
+ "}",
747
+ "",
748
+ "body[data-dsh-claude-style] [data-composer-card] [class*=\"_chevron\"] {",
749
+ " display: none !important;",
750
+ "}",
751
+ "",
752
+ "/* ---------- Claude Code layout: composer footer bar ---------- */",
753
+ "/* Reference layout: two-tier integrated tray. The top card is a pure white",
754
+ " rounded card with drop shadow (z-index: 2). The bottom tray is a seamless",
755
+ " equal-width tray (z-index: 1) attached directly to the bottom of the card,",
756
+ " with transparent background (inheriting the canvas tone #fcfcfb),",
757
+ " left/right/bottom border, and 18px rounded bottom corners. */",
758
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:has([class*=\"heroWorkspaceRow\"]) {",
759
+ " --dsh-claude-bar-h: 96px;",
760
+ "}",
761
+ "",
762
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:has([class*=\"heroWorkspaceRow\"]) *:has([data-composer-card]) {",
763
+ " order: 1;",
764
+ " padding-bottom: 0 !important;",
765
+ "}",
766
+ "",
767
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:has([class*=\"heroWorkspaceRow\"]) [data-composer-card] {",
768
+ " gap: 8px !important;",
769
+ " padding-bottom: 2px !important;",
770
+ " min-height: 0 !important;",
771
+ " height: auto !important;",
772
+ "}",
773
+ "",
774
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:has([class*=\"heroWorkspaceRow\"]) > [class*=\"heroWorkspaceRow\"] {",
775
+ " order: 2;",
776
+ " position: relative;",
777
+ " z-index: 1;",
778
+ " box-sizing: border-box;",
779
+ " height: calc(var(--dsh-claude-bar-h) + 18px);",
780
+ " width: calc(100% - var(--dsh-composer-side-clearance, 0px) - var(--dsh-composer-side-clearance, 0px));",
781
+ " max-width: var(--dsh-composer-card-max-width, 100%);",
782
+ " margin: calc(0px - var(--dsh-composer-stack-gap, 6px) - 18px) auto 0;",
783
+ " padding: 18px 16px 0 16px;",
784
+ " background: transparent;",
785
+ " border-left: 1px solid var(--dsw-alias-border-l1);",
786
+ " border-right: 1px solid var(--dsw-alias-border-l1);",
787
+ " border-bottom: 1px solid var(--dsw-alias-border-l1);",
788
+ " border-top: none;",
789
+ " border-radius: 0 0 18px 18px;",
790
+ " display: flex;",
791
+ " align-items: center;",
792
+ " justify-content: space-between;",
793
+ " transition: border-color 0.12s ease;",
794
+ "}",
795
+ "",
796
+ "/* Muted typography and 7px corners for footer controls */",
797
+ "body[data-dsh-claude-style] [class*=\"heroWorkspaceRow\"] :is(button, [role=\"button\"]) {",
798
+ " font-size: 13px;",
799
+ " color: var(--dsw-alias-label-secondary);",
800
+ " border-radius: 7px;",
801
+ "}",
802
+ "",
803
+ "/* Hide chevrons in the footer tray for a clean, minimal Claude Code look */",
804
+ "body[data-dsh-claude-style] [class*=\"heroWorkspaceRow\"] :is([class*=\"chevron\"], [class*=\"Chevron\"]) {",
805
+ " display: none !important;",
806
+ "}",
807
+ "",
808
+ "/* ---------- Claude Code layout: composer send button ---------- */",
809
+ "/* An empty composer keeps the send button in place but drops it to a ghost:",
810
+ " transparent plate, a hairline in the input box border colour, and the glyph",
811
+ " in the same colour the model control uses for its effort tier (low/high), so",
812
+ " it reads as not-ready instead of vanishing. Flat by design (no shadow), and",
813
+ " border-box keeps the outer 34px so the row does not shift. The stop/queue/",
814
+ " steer labels are untouched, so a running turn keeps its control even with an",
815
+ " empty draft. */",
816
+ "body[data-dsh-claude-style] [data-composer-card]:has([data-composer-placeholder]) :is(button[aria-label=\"发送消息\"], button[aria-label=\"Send message\"]) {",
817
+ " box-sizing: border-box;",
818
+ " background: transparent;",
819
+ " color: var(--dsw-alias-label-caption);",
820
+ " border: 1px solid var(--dsw-alias-border-l2);",
821
+ " box-shadow: none;",
822
+ " cursor: default;",
823
+ "}",
824
+ "",
825
+ "/* ---------- In-conversation single-line composer ---------- */",
826
+ "/* In an active conversation, compress composer to a single-line input card,",
827
+ " render send button as an enter symbol ↵ inside the card on the right,",
828
+ " and display toolbar controls directly underneath on the canvas. */",
829
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"],",
830
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"]:focus-within,",
831
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card],",
832
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:focus-within {",
833
+ " background: transparent !important;",
834
+ " border: none !important;",
835
+ " box-shadow: none !important;",
836
+ " outline: none !important;",
837
+ " padding: 0 !important;",
838
+ " gap: 0 !important;",
839
+ " display: flex !important;",
840
+ " flex-direction: column !important;",
841
+ " position: relative !important;",
842
+ " width: 100% !important;",
843
+ " max-width: var(--dsh-composer-card-max-width, 100%) !important;",
844
+ " box-sizing: border-box !important;",
845
+ " overflow: visible !important;",
846
+ " height: auto !important;",
847
+ "}",
848
+ "/* Do NOT override the host viewArea flex contract here. In the active",
849
+ " phase the host uses `flex: 1 0 auto; min-height: auto` so the viewArea",
850
+ " is content-sized and the sticky composerSeat pins to the scrollport",
851
+ " bottom. An earlier override (`flex: 1 1 auto; min-height: 0`) let the",
852
+ " viewArea shrink to exactly viewport-minus-composer, which put the",
853
+ " composer seat near the TOP of the scroll content — sticky bottom:0",
854
+ " cannot pull an element down past its normal position, so the composer",
855
+ " appeared mid-scroll and never followed message growth. */",
856
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) {",
857
+ " flex: 0 0 auto !important;",
858
+ " overflow: visible !important;",
859
+ " height: auto !important;",
860
+ " max-height: none !important;",
861
+ "}",
862
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"]:not([data-has-attachments=\"true\"]) [class*=\"rail\"]:not([class*=\"trailing\"]),",
863
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:not([data-has-attachments=\"true\"]) [class*=\"rail\"]:not([class*=\"trailing\"]) {",
864
+ " display: none !important;",
865
+ "}",
866
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]),",
867
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]) {",
868
+ " background: var(--dsw-specific-input-major, #ffffff) !important;",
869
+ " border: 1px solid var(--dsw-alias-border-l1) !important;",
870
+ " border-bottom: none !important;",
871
+ " border-radius: 14px 14px 0 0 !important;",
872
+ " padding: 8px 12px 2px 12px !important;",
873
+ " margin: 0 !important;",
874
+ " width: 100% !important;",
875
+ " max-width: 100% !important;",
876
+ " box-sizing: border-box !important;",
877
+ " box-shadow: 0 1px 3px rgba(20, 20, 19, 0.03) !important;",
878
+ " transition: border-color 0.12s ease, box-shadow 0.12s ease !important;",
879
+ "}",
880
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]),",
881
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]) {",
882
+ " background: #ffffff !important;",
883
+ " border-color: #e8e6dc !important;",
884
+ "}",
885
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"]:focus-within [class*=\"rail\"]:not([class*=\"trailing\"]),",
886
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:focus-within [class*=\"rail\"]:not([class*=\"trailing\"]) {",
887
+ " border-color: rgba(20, 20, 19, 0.36) !important;",
888
+ " box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.13), 0 4px 12px rgba(20, 20, 19, 0.05) !important;",
889
+ "}",
890
+ "body[data-dsh-claude-style][data-ds-dark-theme] [data-composer-card][data-composer-variant=\"inline\"]:focus-within [class*=\"rail\"]:not([class*=\"trailing\"]),",
891
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:focus-within [class*=\"rail\"]:not([class*=\"trailing\"]) {",
892
+ " border-color: rgba(0, 0, 0, 0.38) !important;",
893
+ " box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(0, 0, 0, 0.27) !important;",
894
+ "}",
895
+ "/* The attachment rail nests two levels: ComposerAttachments' outer rail wraps",
896
+ " AttachmentRail's scrolling inner rail, and BOTH substring-match",
897
+ " `[class*=\"rail\"]`, so the block above would draw the card frame twice —",
898
+ " one box inside the other. Only the outer shell carries the frame; the",
899
+ " inner scrolling rail stays frameless. */",
900
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]) [class*=\"rail\"]:not([class*=\"trailing\"]),",
901
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card][data-has-attachments=\"true\"] [class*=\"rail\"]:not([class*=\"trailing\"]) [class*=\"rail\"]:not([class*=\"trailing\"]) {",
902
+ " background: transparent !important;",
903
+ " border: none !important;",
904
+ " box-shadow: none !important;",
905
+ " border-radius: 0 !important;",
906
+ " padding: 0 !important;",
907
+ " margin: 0 !important;",
908
+ "}",
909
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [data-input-scroll],",
910
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [data-input-scroll] {",
911
+ " background: var(--dsw-specific-input-major, #ffffff) !important;",
912
+ " border: 1px solid var(--dsw-alias-border-l1) !important;",
913
+ " border-radius: 14px !important;",
914
+ " min-height: 38px !important;",
915
+ " height: auto !important;",
916
+ " max-height: var(--dsh-composer-text-max-height, 180px) !important;",
917
+ " box-sizing: border-box !important;",
918
+ " display: block !important;",
919
+ " width: 100% !important;",
920
+ " max-width: 100% !important;",
921
+ " overflow-y: auto !important;",
922
+ " overflow-x: hidden !important;",
923
+ " padding: 7px 36px 7px 14px !important;",
924
+ " margin: 0 !important;",
925
+ " position: relative !important;",
926
+ " cursor: text !important;",
927
+ " transition: border-color 0.12s ease, box-shadow 0.12s ease !important;",
928
+ "}",
929
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"][data-has-attachments=\"true\"] [data-input-scroll],",
930
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card][data-has-attachments=\"true\"] [data-input-scroll] {",
931
+ " border-top: none !important;",
932
+ " border-radius: 0 0 14px 14px !important;",
933
+ " min-height: 32px !important;",
934
+ " padding: 2px 36px 6px 14px !important;",
935
+ "}",
936
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"] [data-input-scroll],",
937
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [data-input-scroll] {",
938
+ " background: #ffffff !important;",
939
+ " border-color: #e8e6dc !important;",
940
+ " box-shadow: 0 1px 3px rgba(20, 20, 19, 0.03) !important;",
941
+ "}",
942
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"]:focus-within [data-input-scroll],",
943
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:focus-within [data-input-scroll] {",
944
+ " border-color: rgba(20, 20, 19, 0.36) !important;",
945
+ " box-shadow: 0 0 0 1px rgba(20, 20, 19, 0.13), 0 4px 12px rgba(20, 20, 19, 0.05) !important;",
946
+ "}",
947
+ "body[data-dsh-claude-style][data-ds-dark-theme] [data-composer-card][data-composer-variant=\"inline\"]:focus-within [data-input-scroll],",
948
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:focus-within [data-input-scroll] {",
949
+ " border-color: rgba(0, 0, 0, 0.38) !important;",
950
+ " box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(0, 0, 0, 0.27) !important;",
951
+ "}",
952
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [data-input-scroll] [class*=\"grow\"],",
953
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [data-input-scroll] [class*=\"grow\"] {",
954
+ " width: 100% !important;",
955
+ " max-width: 100% !important;",
956
+ " min-height: 24px !important;",
957
+ " position: relative !important;",
958
+ " display: block !important;",
959
+ " box-sizing: border-box !important;",
960
+ " overflow-x: hidden !important;",
961
+ "}",
962
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [data-composer-input],",
963
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [data-composer-input] {",
964
+ " min-height: 24px !important;",
965
+ " height: auto !important;",
966
+ " line-height: 24px !important;",
967
+ " padding: 0 !important;",
968
+ " font-size: 14px !important;",
969
+ " width: 100% !important;",
970
+ " max-width: 100% !important;",
971
+ " box-sizing: border-box !important;",
972
+ " cursor: text !important;",
973
+ " outline: none !important;",
974
+ " white-space: pre-wrap !important;",
975
+ " word-break: break-word !important;",
976
+ " overflow-wrap: anywhere !important;",
977
+ " overflow-x: hidden !important;",
978
+ "}",
979
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [data-composer-placeholder],",
980
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [data-composer-placeholder] {",
981
+ " line-height: 24px !important;",
982
+ " height: 24px !important;",
983
+ " position: absolute !important;",
984
+ " top: 0 !important;",
985
+ " left: 0 !important;",
986
+ " right: 0 !important;",
987
+ " max-width: 100% !important;",
988
+ " box-sizing: border-box !important;",
989
+ " font-size: 14px !important;",
990
+ " color: var(--dsw-alias-label-caption) !important;",
991
+ " white-space: nowrap !important;",
992
+ " text-overflow: ellipsis !important;",
993
+ " overflow: hidden !important;",
994
+ " pointer-events: none !important;",
995
+ " user-select: none !important;",
996
+ "}",
997
+ "/* Pinned send button inside input box */",
998
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"], button[aria-label*=\"排队\"], button[aria-label*=\"Queue\"], button[aria-label*=\"插话\"], button[aria-label*=\"Steer\"], [class*=\"sendBtn\"], [class*=\"sendButton\"]),",
999
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"], button[aria-label*=\"排队\"], button[aria-label*=\"Queue\"], button[aria-label*=\"插话\"], button[aria-label*=\"Steer\"], [class*=\"sendBtn\"], [class*=\"sendButton\"]) {",
1000
+ " position: absolute !important;",
1001
+ " bottom: 40px !important;",
1002
+ " right: 8px !important;",
1003
+ " top: auto !important;",
1004
+ " left: auto !important;",
1005
+ " width: 26px !important;",
1006
+ " height: 26px !important;",
1007
+ " min-width: 26px !important;",
1008
+ " padding: 0 !important;",
1009
+ " border-radius: 6px !important;",
1010
+ " display: inline-flex !important;",
1011
+ " align-items: center !important;",
1012
+ " justify-content: center !important;",
1013
+ " z-index: 10 !important;",
1014
+ " box-shadow: none !important;",
1015
+ " background: transparent !important;",
1016
+ " color: var(--dsw-alias-label-caption) !important;",
1017
+ " border: none !important;",
1018
+ " cursor: pointer !important;",
1019
+ " transition: color 0.12s ease, background-color 0.12s ease !important;",
1020
+ "}",
1021
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"], button[aria-label*=\"排队\"], button[aria-label*=\"Queue\"], button[aria-label*=\"插话\"], button[aria-label*=\"Steer\"], [class*=\"sendBtn\"], [class*=\"sendButton\"]) :is(svg, [class*=\"chevron\"], span) {",
1022
+ " display: none !important;",
1023
+ "}",
1024
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"], button[aria-label*=\"排队\"], button[aria-label*=\"Queue\"], button[aria-label*=\"插话\"], button[aria-label*=\"Steer\"], [class*=\"sendBtn\"], [class*=\"sendButton\"])::after,",
1025
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"], button[aria-label*=\"排队\"], button[aria-label*=\"Queue\"], button[aria-label*=\"插话\"], button[aria-label*=\"Steer\"], [class*=\"sendBtn\"], [class*=\"sendButton\"])::after {",
1026
+ " content: \"↵\" !important;",
1027
+ " font-family: var(--dsw-font-code, monospace) !important;",
1028
+ " font-size: 16px !important;",
1029
+ " font-weight: 500 !important;",
1030
+ " line-height: 1 !important;",
1031
+ " color: currentColor !important;",
1032
+ "}",
1033
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"]):not(:disabled):hover,",
1034
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"]):not(:disabled):hover {",
1035
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1036
+ " color: var(--dsw-alias-label-primary) !important;",
1037
+ "}",
1038
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"]:not(:has([data-composer-placeholder])) :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"]),",
1039
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card]:not(:has([data-composer-placeholder])) :is(button[aria-label^=\"发送\"], button[aria-label^=\"Send\"], button[aria-label*=\"发送\"], button[aria-label*=\"Send\"]) {",
1040
+ " color: var(--dsw-alias-brand-primary, #d97757) !important;",
1041
+ "}",
1042
+ "/* Pinned stop button inside input box */",
1043
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"]),",
1044
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"]) {",
1045
+ " position: absolute !important;",
1046
+ " bottom: 40px !important;",
1047
+ " right: 8px !important;",
1048
+ " top: auto !important;",
1049
+ " left: auto !important;",
1050
+ " width: 26px !important;",
1051
+ " height: 26px !important;",
1052
+ " min-width: 26px !important;",
1053
+ " padding: 0 !important;",
1054
+ " border-radius: 6px !important;",
1055
+ " display: inline-flex !important;",
1056
+ " align-items: center !important;",
1057
+ " justify-content: center !important;",
1058
+ " z-index: 10 !important;",
1059
+ " background: var(--dsw-alias-interactive-bg-hover) !important;",
1060
+ " color: var(--dsw-alias-brand-primary, #d97757) !important;",
1061
+ " border: none !important;",
1062
+ "}",
1063
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"]) svg,",
1064
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"]) svg {",
1065
+ " display: block !important;",
1066
+ " width: 12px !important;",
1067
+ " height: 12px !important;",
1068
+ "}",
1069
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"])::after,",
1070
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label*=\"停止\"], button[aria-label*=\"Stop\"])::after {",
1071
+ " display: none !important;",
1072
+ "}",
1073
+ "/* Toolbar row below input card. `[class*=\"_row\"]` on purpose: a bare",
1074
+ " `[class*=\"row\"]` substring-matches the shipped `.p_FcLG_grow` input",
1075
+ " wrapper (\"grow\" contains \"row\"), and the fixed 28px height + flex",
1076
+ " display here would pin the composer field to one line forever. */",
1077
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"_row\"],",
1078
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"_row\"] {",
1079
+ " display: flex !important;",
1080
+ " flex-wrap: nowrap !important;",
1081
+ " justify-content: space-between !important;",
1082
+ " align-items: center !important;",
1083
+ " padding: 0 4px !important;",
1084
+ " margin: 6px 0 0 0 !important;",
1085
+ " background: transparent !important;",
1086
+ " border: none !important;",
1087
+ " box-shadow: none !important;",
1088
+ " min-height: 28px !important;",
1089
+ " height: 28px !important;",
1090
+ " width: 100% !important;",
1091
+ " max-width: 100% !important;",
1092
+ " box-sizing: border-box !important;",
1093
+ " overflow: visible !important;",
1094
+ "}",
1095
+ "/* The context-occupancy meter renders its click-open panel INSIDE the inline",
1096
+ " composer card, and its legend classes (`…_rows` / `…_row`) substring-match",
1097
+ " the toolbar-row override above — which flattened the shipped definition",
1098
+ " list into one 28px flex line and wrapped every label/value. Restore the",
1099
+ " shipped legend layout: the list stacks vertically, each row keeps its",
1100
+ " natural height and space-between distribution. */",
1101
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"_rows\"],",
1102
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"_rows\"] {",
1103
+ " display: block !important;",
1104
+ " height: auto !important;",
1105
+ " min-height: 0 !important;",
1106
+ " width: auto !important;",
1107
+ " max-width: none !important;",
1108
+ " padding: 0 !important;",
1109
+ "}",
1110
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"_rows\"] [class*=\"_row\"],",
1111
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"_rows\"] [class*=\"_row\"] {",
1112
+ " display: flex !important;",
1113
+ " height: auto !important;",
1114
+ " min-height: 0 !important;",
1115
+ " width: auto !important;",
1116
+ " max-width: none !important;",
1117
+ " padding: 2px 0 !important;",
1118
+ " margin: 0 !important;",
1119
+ "}",
1120
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"tools\"],",
1121
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"tools\"] {",
1122
+ " display: flex !important;",
1123
+ " align-items: center !important;",
1124
+ " gap: 8px !important;",
1125
+ " flex: 0 0 auto !important;",
1126
+ " overflow: visible !important;",
1127
+ "}",
1128
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"modes\"],",
1129
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"modes\"] {",
1130
+ " order: 1 !important;",
1131
+ " display: inline-flex !important;",
1132
+ " align-items: center !important;",
1133
+ " overflow: visible !important;",
1134
+ "}",
1135
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"]),",
1136
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"]) {",
1137
+ " order: 2 !important;",
1138
+ " width: 24px !important;",
1139
+ " height: 24px !important;",
1140
+ " border-radius: 6px !important;",
1141
+ " background: transparent !important;",
1142
+ " color: var(--dsw-alias-label-secondary) !important;",
1143
+ " display: inline-flex !important;",
1144
+ " align-items: center !important;",
1145
+ " justify-content: center !important;",
1146
+ "}",
1147
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]),",
1148
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]) {",
1149
+ " order: 3 !important;",
1150
+ " width: 24px !important;",
1151
+ " height: 24px !important;",
1152
+ " border-radius: 6px !important;",
1153
+ " background: transparent !important;",
1154
+ " color: var(--dsw-alias-label-secondary) !important;",
1155
+ " display: inline-flex !important;",
1156
+ " align-items: center !important;",
1157
+ " justify-content: center !important;",
1158
+ "}",
1159
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"], button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]):hover:not(:disabled),",
1160
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] :is(button[aria-label=\"指令\"], button[aria-label=\"Commands\"], button[aria-label=\"添加附件\"], button[aria-label=\"Add attachment\"]):hover:not(:disabled) {",
1161
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1162
+ " color: var(--dsw-alias-label-primary) !important;",
1163
+ "}",
1164
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"trailing\"],",
1165
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-card] [class*=\"trailing\"] {",
1166
+ " display: flex !important;",
1167
+ " align-items: center !important;",
1168
+ " gap: 8px !important;",
1169
+ " margin-left: auto !important;",
1170
+ " flex: 0 0 auto !important;",
1171
+ "}",
1172
+ "/* Model trigger in trailing */",
1173
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"trailing\"] > :first-child,",
1174
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] [class*=\"trailing\"] :is([class*=\"trigger\" i], [class*=\"model\" i], [class*=\"Model\"]) {",
1175
+ " display: inline-flex !important;",
1176
+ " align-items: center !important;",
1177
+ " font-size: 13px !important;",
1178
+ " color: var(--dsw-alias-label-secondary) !important;",
1179
+ " border-radius: 7px !important;",
1180
+ " cursor: pointer !important;",
1181
+ " visibility: visible !important;",
1182
+ " opacity: 1 !important;",
1183
+ "}",
1184
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"] [class*=\"trailing\"] > :first-child:hover:not(:disabled),",
1185
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) [data-composer-card][data-composer-variant=\"inline\"] [class*=\"trailing\"] :is([class*=\"trigger\" i], [class*=\"model\" i], [class*=\"Model\"]):hover:not(:disabled) {",
1186
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.06)) !important;",
1187
+ " color: var(--dsw-alias-label-primary) !important;",
1188
+ "}",
1189
+ "/* Separate Token stats row below the composer card */",
1190
+ "body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] ~ [data-composer-stats],",
1191
+ "body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-stats] {",
1192
+ " display: flex !important;",
1193
+ " align-items: center !important;",
1194
+ " justify-content: center !important;",
1195
+ " gap: 12px !important;",
1196
+ " font-size: 12px !important;",
1197
+ " color: var(--dsw-alias-label-secondary) !important;",
1198
+ " margin: 6px auto 0 !important;",
1199
+ " height: 24px !important;",
1200
+ " line-height: 24px !important;",
1201
+ " pointer-events: auto !important;",
1202
+ " width: 100% !important;",
1203
+ " max-width: var(--dsh-composer-card-max-width, 100%) !important;",
1204
+ " box-sizing: border-box !important;",
1205
+ " overflow: hidden !important;",
1206
+ " white-space: nowrap !important;",
1207
+ " text-overflow: ellipsis !important;",
1208
+ "}",
1209
+ "@media (max-width: 820px) {",
1210
+ " body[data-dsh-claude-style] [data-composer-card][data-composer-variant=\"inline\"] ~ [data-composer-stats],",
1211
+ " body[data-dsh-claude-style] [class*=\"composerStack\"]:not(:has([class*=\"heroWorkspaceRow\"])) [data-composer-stats] {",
1212
+ " display: none !important;",
1213
+ " }",
1214
+ "}",
1215
+ "",
1216
+ "/* ---------- Claude Code layout: sidebar brand ---------- */",
1217
+ "/* The shipped whale and wordmark give way to the selected brand. Each variant",
1218
+ " is painted as an alpha mask over currentColor, so it follows the light/dark",
1219
+ " label colour instead of carrying a baked-in one. The choice is switched by a",
1220
+ " document attribute rather than by swapping the stylesheet, so the settings",
1221
+ " page only has to flip one attribute and the whole UI follows.",
1222
+ "",
1223
+ " Sizing: both marks are set to an 18px cap height to match the shipped",
1224
+ " brandName box, and each wordmark takes its natural width from that height",
1225
+ " via the artwork aspect ratios (Claude 4.214:1, ANTHROPIC ~8.94:1). The",
1226
+ " wordmark keeps a max-width so a longer brand can never clip the row. */",
1227
+ "body[data-dsh-claude-style] :is([class*=\"brandMark\"], [class*=\"railMark\"]) > * {",
1228
+ " display: none !important;",
1229
+ "}",
1230
+ "",
1231
+ "body[data-dsh-claude-style] :is([class*=\"brandMark\"], [class*=\"railMark\"])::before {",
1232
+ " content: \"\";",
1233
+ " display: block;",
1234
+ " flex: none;",
1235
+ " background-color: currentColor;",
1236
+ " background-repeat: no-repeat;",
1237
+ " background-position: center;",
1238
+ " background-size: contain;",
1239
+ "}",
1240
+ "",
1241
+ "/* Claude (default): starburst mark + the Claude wordmark. */",
1242
+ "body[data-dsh-claude-style]:not([data-dsh-claude-brand=\"anthropic\"]) :is([class*=\"brandMark\"], [class*=\"railMark\"])::before {",
1243
+ " width: 18px;",
1244
+ " height: 18px;",
1245
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20148.09%20148.18'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20105.01%2C322.07%2029.14%2C-16.35%200.49%2C-1.42%20-0.49%2C-0.79%20h%20-1.42%20l%20-4.87%2C-0.3%20-16.65%2C-0.45%20-14.44%2C-0.6%20-13.99%2C-0.75%20-3.52%2C-0.75%20-3.3%2C-4.35%200.34%2C-2.17%202.96%2C-1.99%204.24%2C0.37%209.37%2C0.64%2014.06%2C0.97%2010.2%2C0.6%2015.11%2C1.57%20h%202.4%20l%200.34%2C-0.97%20-0.82%2C-0.6%20-0.64%2C-0.6%20-14.55%2C-9.86%20-15.75%2C-10.42%20-8.25%2C-6%20-4.46%2C-3.04%20-2.25%2C-2.85%20-0.97%2C-6.22%204.05%2C-4.46%205.44%2C0.37%201.39%2C0.37%205.51%2C4.24%2011.77%2C9.11%2015.37%2C11.32%202.25%2C1.87%200.9%2C-0.64%200.11%2C-0.45%20-1.01%2C-1.69%20-8.36%2C-15.11%20-8.92%2C-15.37%20-3.97%2C-6.37%20-1.05%2C-3.82%20c%20-0.37%2C-1.57%20-0.64%2C-2.89%20-0.64%2C-4.5%20l%204.61%2C-6.26%202.55%2C-0.82%206.15%2C0.82%202.59%2C2.25%203.82%2C8.74%206.19%2C13.76%209.6%2C18.71%202.81%2C5.55%201.5%2C5.14%200.56%2C1.57%20h%200.97%20v%20-0.9%20l%200.79%2C-10.54%201.46%2C-12.94%201.42%2C-16.65%200.49%2C-4.69%202.32%2C-5.62%204.61%2C-3.04%203.6%2C1.72%202.96%2C4.24%20-0.41%2C2.74%20-1.76%2C11.44%20-3.45%2C17.92%20-2.25%2C12%20h%201.31%20l%201.5%2C-1.5%206.07%2C-8.06%2010.2%2C-12.75%204.5%2C-5.06%205.25%2C-5.59%203.37%2C-2.66%20h%206.37%20l%204.69%2C6.97%20-2.1%2C7.2%20-6.56%2C8.32%20-5.44%2C7.05%20-7.8%2C10.5%20-4.87%2C8.4%200.45%2C0.67%201.16%2C-0.11%2017.62%2C-3.75%209.52%2C-1.72%2011.36%2C-1.95%205.14%2C2.4%200.56%2C2.44%20-2.02%2C4.99%20-12.15%2C3%20-14.25%2C2.85%20-21.22%2C5.02%20-0.26%2C0.19%200.3%2C0.37%209.56%2C0.9%204.09%2C0.22%20h%2010.01%20l%2018.64%2C1.39%204.87%2C3.22%202.92%2C3.94%20-0.49%2C3%20-7.5%2C3.82%20-10.12%2C-2.4%20-23.62%2C-5.62%20-8.1%2C-2.02%20h%20-1.12%20v%200.67%20l%206.75%2C6.6%2012.37%2C11.17%2015.49%2C14.4%200.79%2C3.56%20-1.99%2C2.81%20-2.1%2C-0.3%20-13.61%2C-10.24%20-5.25%2C-4.61%20-11.89%2C-10.01%20h%20-0.79%20v%201.05%20l%202.74%2C4.01%2014.47%2C21.75%200.75%2C6.67%20-1.05%2C2.17%20-3.75%2C1.31%20-4.12%2C-0.75%20-8.47%2C-11.89%20-8.74%2C-13.39%20-7.05%2C-12%20-0.86%2C0.49%20-4.16%2C44.81%20-1.95%2C2.29%20-4.5%2C1.72%20-3.75%2C-2.85%20-1.99%2C-4.61%201.99%2C-9.11%202.4%2C-11.89%201.95%2C-9.45%201.76%2C-11.74%201.05%2C-3.9%20-0.07%2C-0.26%20-0.86%2C0.11%20-8.85%2C12.15%20-13.46%2C18.19%20-10.65%2C11.4%20-2.55%2C1.01%20-4.42%2C-2.29%200.41%2C-4.09%202.47%2C-3.64%2014.74%2C-18.75%208.89%2C-11.62%205.74%2C-6.71%20-0.04%2C-0.97%20h%20-0.34%20l%20-39.15%2C25.42%20-6.97%2C0.9%20-3%2C-2.81%200.37%2C-4.61%201.42%2C-1.5%2011.77%2C-8.1%20-0.04%2C0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\") center / contain no-repeat;",
1246
+ " mask: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%20148.09%20148.18'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20105.01%2C322.07%2029.14%2C-16.35%200.49%2C-1.42%20-0.49%2C-0.79%20h%20-1.42%20l%20-4.87%2C-0.3%20-16.65%2C-0.45%20-14.44%2C-0.6%20-13.99%2C-0.75%20-3.52%2C-0.75%20-3.3%2C-4.35%200.34%2C-2.17%202.96%2C-1.99%204.24%2C0.37%209.37%2C0.64%2014.06%2C0.97%2010.2%2C0.6%2015.11%2C1.57%20h%202.4%20l%200.34%2C-0.97%20-0.82%2C-0.6%20-0.64%2C-0.6%20-14.55%2C-9.86%20-15.75%2C-10.42%20-8.25%2C-6%20-4.46%2C-3.04%20-2.25%2C-2.85%20-0.97%2C-6.22%204.05%2C-4.46%205.44%2C0.37%201.39%2C0.37%205.51%2C4.24%2011.77%2C9.11%2015.37%2C11.32%202.25%2C1.87%200.9%2C-0.64%200.11%2C-0.45%20-1.01%2C-1.69%20-8.36%2C-15.11%20-8.92%2C-15.37%20-3.97%2C-6.37%20-1.05%2C-3.82%20c%20-0.37%2C-1.57%20-0.64%2C-2.89%20-0.64%2C-4.5%20l%204.61%2C-6.26%202.55%2C-0.82%206.15%2C0.82%202.59%2C2.25%203.82%2C8.74%206.19%2C13.76%209.6%2C18.71%202.81%2C5.55%201.5%2C5.14%200.56%2C1.57%20h%200.97%20v%20-0.9%20l%200.79%2C-10.54%201.46%2C-12.94%201.42%2C-16.65%200.49%2C-4.69%202.32%2C-5.62%204.61%2C-3.04%203.6%2C1.72%202.96%2C4.24%20-0.41%2C2.74%20-1.76%2C11.44%20-3.45%2C17.92%20-2.25%2C12%20h%201.31%20l%201.5%2C-1.5%206.07%2C-8.06%2010.2%2C-12.75%204.5%2C-5.06%205.25%2C-5.59%203.37%2C-2.66%20h%206.37%20l%204.69%2C6.97%20-2.1%2C7.2%20-6.56%2C8.32%20-5.44%2C7.05%20-7.8%2C10.5%20-4.87%2C8.4%200.45%2C0.67%201.16%2C-0.11%2017.62%2C-3.75%209.52%2C-1.72%2011.36%2C-1.95%205.14%2C2.4%200.56%2C2.44%20-2.02%2C4.99%20-12.15%2C3%20-14.25%2C2.85%20-21.22%2C5.02%20-0.26%2C0.19%200.3%2C0.37%209.56%2C0.9%204.09%2C0.22%20h%2010.01%20l%2018.64%2C1.39%204.87%2C3.22%202.92%2C3.94%20-0.49%2C3%20-7.5%2C3.82%20-10.12%2C-2.4%20-23.62%2C-5.62%20-8.1%2C-2.02%20h%20-1.12%20v%200.67%20l%206.75%2C6.6%2012.37%2C11.17%2015.49%2C14.4%200.79%2C3.56%20-1.99%2C2.81%20-2.1%2C-0.3%20-13.61%2C-10.24%20-5.25%2C-4.61%20-11.89%2C-10.01%20h%20-0.79%20v%201.05%20l%202.74%2C4.01%2014.47%2C21.75%200.75%2C6.67%20-1.05%2C2.17%20-3.75%2C1.31%20-4.12%2C-0.75%20-8.47%2C-11.89%20-8.74%2C-13.39%20-7.05%2C-12%20-0.86%2C0.49%20-4.16%2C44.81%20-1.95%2C2.29%20-4.5%2C1.72%20-3.75%2C-2.85%20-1.99%2C-4.61%201.99%2C-9.11%202.4%2C-11.89%201.95%2C-9.45%201.76%2C-11.74%201.05%2C-3.9%20-0.07%2C-0.26%20-0.86%2C0.11%20-8.85%2C12.15%20-13.46%2C18.19%20-10.65%2C11.4%20-2.55%2C1.01%20-4.42%2C-2.29%200.41%2C-4.09%202.47%2C-3.64%2014.74%2C-18.75%208.89%2C-11.62%205.74%2C-6.71%20-0.04%2C-0.97%20h%20-0.34%20l%20-39.15%2C25.42%20-6.97%2C0.9%20-3%2C-2.81%200.37%2C-4.61%201.42%2C-1.5%2011.77%2C-8.1%20-0.04%2C0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\") center / contain no-repeat;",
1247
+ "}",
1248
+ "",
1249
+ "body[data-dsh-claude-style] [class*=\"brandIdentity\"] > [class*=\"brandName\"] > * {",
1250
+ " display: none !important;",
1251
+ "}",
1252
+ "",
1253
+ "body[data-dsh-claude-style] [class*=\"brandIdentity\"] > [class*=\"brandName\"]::before {",
1254
+ " content: \"\";",
1255
+ " display: block;",
1256
+ " flex: none;",
1257
+ " background-color: currentColor;",
1258
+ " background-repeat: no-repeat;",
1259
+ " background-position: center;",
1260
+ " background-size: contain;",
1261
+ "}",
1262
+ "",
1263
+ "body[data-dsh-claude-style]:not([data-dsh-claude-brand=\"anthropic\"]) [class*=\"brandIdentity\"] > [class*=\"brandName\"]::before {",
1264
+ " width: 75.9px;",
1265
+ " max-width: 100%;",
1266
+ " height: 18px;",
1267
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'177.76%2014.09%20512.22%20121.54'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20317.73%2C349.33%20c%20-18.82%2C0%20-31.69%2C-10.5%20-37.76%2C-26.66%20-3.17%2C-8.42%20-4.74%2C-17.36%20-4.61%2C-26.36%200%2C-27.11%2012.15%2C-45.94%2039%2C-45.94%2018.04%2C0%2029.17%2C7.87%2035.51%2C26.66%20h%207.72%20l%20-1.05%2C-25.91%20c%20-10.8%2C-6.97%20-24.3%2C-10.5%20-40.72%2C-10.5%20-23.14%2C0%20-42.82%2C10.35%20-53.77%2C29.02%20-5.66%2C9.86%20-8.53%2C21.07%20-8.32%2C32.44%200%2C20.74%209.79%2C39.11%2028.16%2C49.31%2010.06%2C5.37%2021.34%2C8.04%2032.74%2C7.72%2017.92%2C0%2032.14%2C-3.41%2044.74%2C-9.37%20l%203.26%2C-28.57%20h%20-7.87%20c%20-4.72%2C13.05%20-10.35%2C20.89%20-19.69%2C25.05%20-4.57%2C2.06%20-10.35%2C3.11%20-17.32%2C3.11%20z%20m%2081.18%2C-98.96%200.75%2C-12.75%20h%20-5.32%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2089.17%20c%200%2C6.07%20-3.11%2C7.42%20-11.25%2C8.44%20v%206.52%20h%2040.31%20v%20-6.52%20c%20-8.17%2C-1.01%20-11.25%2C-2.36%20-11.25%2C-8.44%20V%20250.4%20l%20-0.04%2C-0.04%20z%20m%20160.31%2C108.75%20h%203.11%20l%2027.26%2C-5.17%20v%20-6.67%20l%20-3.82%2C-0.3%20c%20-6.37%2C-0.6%20-8.02%2C-1.91%20-8.02%2C-7.12%20v%20-47.55%20l%200.75%2C-15.26%20h%20-4.31%20l%20-25.76%2C3.71%20v%206.52%20l%202.51%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2042.37%20c%20-6.67%2C5.17%20-13.05%2C8.44%20-20.62%2C8.44%20-8.4%2C0%20-13.61%2C-4.27%20-13.61%2C-14.25%20v%20-39.79%20l%200.75%2C-15.26%20h%20-4.42%20l%20-25.8%2C3.71%20v%206.52%20l%202.66%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2039.11%20c%200%2C16.57%209.37%2C24.45%2024.3%2C24.45%2011.4%2C0%2020.74%2C-6.07%2027.75%2C-14.51%20l%20-0.75%2C14.51%20-0.04%2C-0.04%20z%20M%20484.3%2C306.36%20c%200%2C-21.19%20-11.25%2C-29.32%20-31.57%2C-29.32%20-17.92%2C0%20-30.94%2C7.42%20-30.94%2C19.72%200%2C3.67%201.31%2C6.49%203.97%2C8.44%20l%2013.65%2C-1.8%20c%20-0.6%2C-4.12%20-0.9%2C-6.64%20-0.9%2C-7.69%200%2C-6.97%203.71%2C-10.5%2011.25%2C-10.5%2011.14%2C0%2016.76%2C7.84%2016.76%2C20.44%20v%204.12%20l%20-28.12%2C8.44%20c%20-9.37%2C2.55%20-14.7%2C4.76%20-18.26%2C9.94%20-1.89%2C3.17%20-2.8%2C6.82%20-2.62%2C10.5%200%2C12%208.25%2C20.47%2022.35%2C20.47%2010.2%2C0%2019.24%2C-4.61%2027.11%2C-13.35%202.81%2C8.74%207.12%2C13.35%2014.81%2C13.35%206.22%2C0%2011.85%2C-2.51%2016.87%2C-7.42%20l%20-1.5%2C-5.17%20c%20-2.17%2C0.6%20-4.27%2C0.9%20-6.49%2C0.9%20-4.31%2C0%20-6.37%2C-3.41%20-6.37%2C-10.09%20v%20-30.97%20z%20m%20-36%2C40.76%20c%20-7.69%2C0%20-12.45%2C-4.46%20-12.45%2C-12.3%200%2C-5.32%202.51%2C-8.44%207.87%2C-10.24%20l%2022.8%2C-7.24%20v%2021.9%20c%20-7.27%2C5.51%20-11.55%2C7.87%20-18.22%2C7.87%20z%20m%20237.36%2C6.82%20v%20-6.67%20l%20-3.86%2C-0.3%20c%20-6.37%2C-0.6%20-7.99%2C-1.91%20-7.99%2C-7.12%20v%20-89.47%20l%200.75%2C-12.75%20h%20-5.36%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2029.32%20c%20-5.91%2C-4.05%20-12.98%2C-6.08%20-20.14%2C-5.77%20-23.55%2C0%20-41.92%2C17.92%20-41.92%2C44.74%200%2C22.09%2013.2%2C37.35%2034.95%2C37.35%2011.25%2C0%2021.04%2C-5.47%2027.11%2C-13.95%20l%20-0.75%2C13.95%20h%203.15%20l%2027.26%2C-5.17%20v%200%20z%20m%20-49.35%2C-68.02%20c%2011.25%2C0%2019.69%2C6.52%2019.69%2C18.52%20v%2033.75%20c%20-5.18%2C5.16%20-12.23%2C8%20-19.54%2C7.87%20-16.12%2C0%20-24.3%2C-12.75%20-24.3%2C-29.77%200%2C-19.12%209.34%2C-30.37%2024.15%2C-30.37%20z%20M%20743.3%2C302.8%20c%20-2.1%2C-9.9%20-8.17%2C-15.52%20-16.61%2C-15.52%20-12.6%2C0%20-21.34%2C9.49%20-21.34%2C23.1%200%2C20.14%2010.65%2C33.19%2027.86%2C33.19%2011.48%2C-0.12%2022.04%2C-6.33%2027.71%2C-16.31%20l%205.02%2C1.35%20c%20-2.25%2C17.47%20-18.07%2C30.52%20-37.5%2C30.52%20-22.8%2C0%20-38.51%2C-16.87%20-38.51%2C-40.87%200%2C-24%2017.06%2C-41.21%2039.86%2C-41.21%2017.02%2C0%2029.02%2C10.24%2032.89%2C28.01%20l%20-59.4%2C18.22%20v%20-8.02%20l%2040.01%2C-12.41%20v%20-0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\") center / contain no-repeat;",
1268
+ " mask: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'177.76%2014.09%20512.22%20121.54'%3E%3Cg%20transform%3D'translate(-75.96%2C-223.53)'%3E%3Cpath%20d%3D'm%20317.73%2C349.33%20c%20-18.82%2C0%20-31.69%2C-10.5%20-37.76%2C-26.66%20-3.17%2C-8.42%20-4.74%2C-17.36%20-4.61%2C-26.36%200%2C-27.11%2012.15%2C-45.94%2039%2C-45.94%2018.04%2C0%2029.17%2C7.87%2035.51%2C26.66%20h%207.72%20l%20-1.05%2C-25.91%20c%20-10.8%2C-6.97%20-24.3%2C-10.5%20-40.72%2C-10.5%20-23.14%2C0%20-42.82%2C10.35%20-53.77%2C29.02%20-5.66%2C9.86%20-8.53%2C21.07%20-8.32%2C32.44%200%2C20.74%209.79%2C39.11%2028.16%2C49.31%2010.06%2C5.37%2021.34%2C8.04%2032.74%2C7.72%2017.92%2C0%2032.14%2C-3.41%2044.74%2C-9.37%20l%203.26%2C-28.57%20h%20-7.87%20c%20-4.72%2C13.05%20-10.35%2C20.89%20-19.69%2C25.05%20-4.57%2C2.06%20-10.35%2C3.11%20-17.32%2C3.11%20z%20m%2081.18%2C-98.96%200.75%2C-12.75%20h%20-5.32%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2089.17%20c%200%2C6.07%20-3.11%2C7.42%20-11.25%2C8.44%20v%206.52%20h%2040.31%20v%20-6.52%20c%20-8.17%2C-1.01%20-11.25%2C-2.36%20-11.25%2C-8.44%20V%20250.4%20l%20-0.04%2C-0.04%20z%20m%20160.31%2C108.75%20h%203.11%20l%2027.26%2C-5.17%20v%20-6.67%20l%20-3.82%2C-0.3%20c%20-6.37%2C-0.6%20-8.02%2C-1.91%20-8.02%2C-7.12%20v%20-47.55%20l%200.75%2C-15.26%20h%20-4.31%20l%20-25.76%2C3.71%20v%206.52%20l%202.51%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2042.37%20c%20-6.67%2C5.17%20-13.05%2C8.44%20-20.62%2C8.44%20-8.4%2C0%20-13.61%2C-4.27%20-13.61%2C-14.25%20v%20-39.79%20l%200.75%2C-15.26%20h%20-4.42%20l%20-25.8%2C3.71%20v%206.52%20l%202.66%2C0.45%20c%206.97%2C1.01%209.04%2C2.96%209.04%2C7.84%20v%2039.11%20c%200%2C16.57%209.37%2C24.45%2024.3%2C24.45%2011.4%2C0%2020.74%2C-6.07%2027.75%2C-14.51%20l%20-0.75%2C14.51%20-0.04%2C-0.04%20z%20M%20484.3%2C306.36%20c%200%2C-21.19%20-11.25%2C-29.32%20-31.57%2C-29.32%20-17.92%2C0%20-30.94%2C7.42%20-30.94%2C19.72%200%2C3.67%201.31%2C6.49%203.97%2C8.44%20l%2013.65%2C-1.8%20c%20-0.6%2C-4.12%20-0.9%2C-6.64%20-0.9%2C-7.69%200%2C-6.97%203.71%2C-10.5%2011.25%2C-10.5%2011.14%2C0%2016.76%2C7.84%2016.76%2C20.44%20v%204.12%20l%20-28.12%2C8.44%20c%20-9.37%2C2.55%20-14.7%2C4.76%20-18.26%2C9.94%20-1.89%2C3.17%20-2.8%2C6.82%20-2.62%2C10.5%200%2C12%208.25%2C20.47%2022.35%2C20.47%2010.2%2C0%2019.24%2C-4.61%2027.11%2C-13.35%202.81%2C8.74%207.12%2C13.35%2014.81%2C13.35%206.22%2C0%2011.85%2C-2.51%2016.87%2C-7.42%20l%20-1.5%2C-5.17%20c%20-2.17%2C0.6%20-4.27%2C0.9%20-6.49%2C0.9%20-4.31%2C0%20-6.37%2C-3.41%20-6.37%2C-10.09%20v%20-30.97%20z%20m%20-36%2C40.76%20c%20-7.69%2C0%20-12.45%2C-4.46%20-12.45%2C-12.3%200%2C-5.32%202.51%2C-8.44%207.87%2C-10.24%20l%2022.8%2C-7.24%20v%2021.9%20c%20-7.27%2C5.51%20-11.55%2C7.87%20-18.22%2C7.87%20z%20m%20237.36%2C6.82%20v%20-6.67%20l%20-3.86%2C-0.3%20c%20-6.37%2C-0.6%20-7.99%2C-1.91%20-7.99%2C-7.12%20v%20-89.47%20l%200.75%2C-12.75%20h%20-5.36%20l%20-23.7%2C7.12%20v%203.86%20l%2010.5%2C4.87%20v%2029.32%20c%20-5.91%2C-4.05%20-12.98%2C-6.08%20-20.14%2C-5.77%20-23.55%2C0%20-41.92%2C17.92%20-41.92%2C44.74%200%2C22.09%2013.2%2C37.35%2034.95%2C37.35%2011.25%2C0%2021.04%2C-5.47%2027.11%2C-13.95%20l%20-0.75%2C13.95%20h%203.15%20l%2027.26%2C-5.17%20v%200%20z%20m%20-49.35%2C-68.02%20c%2011.25%2C0%2019.69%2C6.52%2019.69%2C18.52%20v%2033.75%20c%20-5.18%2C5.16%20-12.23%2C8%20-19.54%2C7.87%20-16.12%2C0%20-24.3%2C-12.75%20-24.3%2C-29.77%200%2C-19.12%209.34%2C-30.37%2024.15%2C-30.37%20z%20M%20743.3%2C302.8%20c%20-2.1%2C-9.9%20-8.17%2C-15.52%20-16.61%2C-15.52%20-12.6%2C0%20-21.34%2C9.49%20-21.34%2C23.1%200%2C20.14%2010.65%2C33.19%2027.86%2C33.19%2011.48%2C-0.12%2022.04%2C-6.33%2027.71%2C-16.31%20l%205.02%2C1.35%20c%20-2.25%2C17.47%20-18.07%2C30.52%20-37.5%2C30.52%20-22.8%2C0%20-38.51%2C-16.87%20-38.51%2C-40.87%200%2C-24%2017.06%2C-41.21%2039.86%2C-41.21%2017.02%2C0%2029.02%2C10.24%2032.89%2C28.01%20l%20-59.4%2C18.22%20v%20-8.02%20l%2040.01%2C-12.41%20v%20-0.04%20z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\") center / contain no-repeat;",
1269
+ "}",
1270
+ "",
1271
+ "/* Anthropic (alternate): the A\\ lockup + the ANTHROPIC wordmark. */",
1272
+ "body[data-dsh-claude-style][data-dsh-claude-brand=\"anthropic\"] :is([class*=\"brandMark\"], [class*=\"railMark\"])::before {",
1273
+ " width: 25.9px;",
1274
+ " height: 18px;",
1275
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 46 32%27%3E%3Cpath d=%27M32.73 0H25.7846L38.4499 32H45.3953L32.73 0Z%27/%3E%3Cpath d=%27M12.6653 0L0 32H7.08167L9.67193 25.28H22.9219L25.5122 32H32.5939L19.9286 0H12.6653ZM11.9626 19.3371L16.2969 8.09143L20.6313 19.3371H11.9626Z%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1276
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 46 32%27%3E%3Cpath d=%27M32.73 0H25.7846L38.4499 32H45.3953L32.73 0Z%27/%3E%3Cpath d=%27M12.6653 0L0 32H7.08167L9.67193 25.28H22.9219L25.5122 32H32.5939L19.9286 0H12.6653ZM11.9626 19.3371L16.2969 8.09143L20.6313 19.3371H11.9626Z%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1277
+ "}",
1278
+ "",
1279
+ "body[data-dsh-claude-style][data-dsh-claude-brand=\"anthropic\"] [class*=\"brandIdentity\"] > [class*=\"brandName\"]::before {",
1280
+ " width: 160.9px;",
1281
+ " max-width: 100%;",
1282
+ " height: 18px;",
1283
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 143 16%27%3E%3Cpath transform=%27translate(18.299999237060547,0.27000001072883606)%27 d=%27 M10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 3.756195545196533,0 3.756195545196533,0 C3.756195545196533,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.2038140296936035,15.470022201538086 3.2038140296936035,15.470022201538086 C3.2038140296936035,15.470022201538086 3.2038140296936035,4.6410064697265625 3.2038140296936035,4.6410064697265625 C3.2038140296936035,4.6410064697265625 10.163809776306152,15.470022201538086 10.163809776306152,15.470022201538086 C10.163809776306152,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.716191291809082,0 10.716191291809082,0 C10.716191291809082,0 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777z%27/%3E%3Cpath transform=%27translate(34.869998931884766,0.27000001072883606)%27 d=%27 M0,2.983504056930542 C0,2.983504056930542 5.19273567199707,2.983504056930542 5.19273567199707,2.983504056930542 C5.19273567199707,2.983504056930542 5.19273567199707,15.470022201538086 5.19273567199707,15.470022201538086 C5.19273567199707,15.470022201538086 8.507256507873535,15.470022201538086 8.507256507873535,15.470022201538086 C8.507256507873535,15.470022201538086 8.507256507873535,2.983504056930542 8.507256507873535,2.983504056930542 C8.507256507873535,2.983504056930542 13.700006484985352,2.983504056930542 13.700006484985352,2.983504056930542 C13.700006484985352,2.983504056930542 13.700006484985352,0 13.700006484985352,0 C13.700006484985352,0 0,0 0,0 C0,0 0,2.983504056930542 0,2.983504056930542 C0,2.983504056930542 0,2.983504056930542 0,2.983504056930542z%27/%3E%3Cpath transform=%27translate(51.22999954223633,0.27000001072883606)%27 d=%27 M10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 3.3142902851104736,6.165900230407715 3.3142902851104736,6.165900230407715 C3.3142902851104736,6.165900230407715 3.3142902851104736,0 3.3142902851104736,0 C3.3142902851104736,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3142902851104736,15.470022201538086 3.3142902851104736,15.470022201538086 C3.3142902851104736,15.470022201538086 3.3142902851104736,9.149404525756836 3.3142902851104736,9.149404525756836 C3.3142902851104736,9.149404525756836 10.605714797973633,9.149404525756836 10.605714797973633,9.149404525756836 C10.605714797973633,9.149404525756836 10.605714797973633,15.470022201538086 10.605714797973633,15.470022201538086 C10.605714797973633,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.605714797973633,0 10.605714797973633,0 C10.605714797973633,0 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715z%27/%3E%3Cpath transform=%27translate(69.23999786376953,0.27000001072883606)%27 d=%27 M3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 7.403865814208984,2.983504056930542 7.403865814208984,2.983504056930542 C9.03934097290039,2.983504056930542 9.901290893554688,3.5801939964294434 9.901290893554688,4.707304000854492 C9.901290893554688,5.834399700164795 9.03934097290039,6.431103706359863 7.403865814208984,6.431103706359863 C7.403865814208984,6.431103706359863 3.3151700496673584,6.431103706359863 3.3151700496673584,6.431103706359863 C3.3151700496673584,6.431103706359863 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542z M13.216461181640625,4.707304000854492 C13.216461181640625,1.7900969982147217 11.072648048400879,0 7.558576583862305,0 C7.558576583862305,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3151700496673584,15.470022201538086 3.3151700496673584,15.470022201538086 C3.3151700496673584,15.470022201538086 3.3151700496673584,9.414593696594238 3.3151700496673584,9.414593696594238 C3.3151700496673584,9.414593696594238 7.005825519561768,9.414593696594238 7.005825519561768,9.414593696594238 C7.005825519561768,9.414593696594238 10.321218490600586,15.470022201538086 10.321218490600586,15.470022201538086 C10.321218490600586,15.470022201538086 13.990056991577148,15.470022201538086 13.990056991577148,15.470022201538086 C13.990056991577148,15.470022201538086 10.319005966186523,8.953378677368164 10.319005966186523,8.953378677368164 C12.161579132080078,8.245061874389648 13.216461181640625,6.753532409667969 13.216461181640625,4.707304000854492 C13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492z%27/%3E%3Cpath transform=%27translate(84.98999786376953,0)%27 d=%27 M7.622087478637695,12.906073570251465 C5.015110492706299,12.906073570251465 3.4244225025177,11.049725532531738 3.4244225025177,8.022093772888184 C3.4244225025177,4.95027494430542 5.015110492706299,3.0939269065856934 7.622087478637695,3.0939269065856934 C10.206976890563965,3.0939269065856934 11.775577545166016,4.95027494430542 11.775577545166016,8.022093772888184 C11.775577545166016,11.049725532531738 10.206976890563965,12.906073570251465 7.622087478637695,12.906073570251465 C7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465z M7.622087478637695,0 C3.1593029499053955,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1593029499053955,16 7.622087478637695,16 C12.062784194946289,16 15.200028419494629,12.685078620910645 15.200028419494629,8.022093772888184 C15.200028419494629,3.3149218559265137 12.062784194946289,0 7.622087478637695,0 C7.622087478637695,0 7.622087478637695,0 7.622087478637695,0z%27/%3E%3Cpath transform=%27translate(103.29000091552734,0.27000001072883606)%27 d=%27 M7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 3.3160574436187744,6.873104095458984 3.3160574436187744,6.873104095458984 C3.3160574436187744,6.873104095458984 3.3160574436187744,2.983504056930542 3.3160574436187744,2.983504056930542 C3.3160574436187744,2.983504056930542 7.405848026275635,2.983504056930542 7.405848026275635,2.983504056930542 C9.04176139831543,2.983504056930542 9.90394115447998,3.646505117416382 9.90394115447998,4.928304195404053 C9.90394115447998,6.2101030349731445 9.04176139831543,6.873104095458984 7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984z M7.5605998039245605,0 C7.5605998039245605,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3160574436187744,15.470022201538086 3.3160574436187744,15.470022201538086 C3.3160574436187744,15.470022201538086 3.3160574436187744,9.85659408569336 3.3160574436187744,9.85659408569336 C3.3160574436187744,9.85659408569336 7.5605998039245605,9.85659408569336 7.5605998039245605,9.85659408569336 C11.07561206817627,9.85659408569336 13.219999313354492,8.000200271606445 13.219999313354492,4.928304195404053 C13.219999313354492,1.8563942909240723 11.07561206817627,0 7.5605998039245605,0 C7.5605998039245605,0 7.5605998039245605,0 7.5605998039245605,0z%27/%3E%3Cpath transform=%27translate(128.0399932861328,0)%27 d=%27 M10.914844512939453,10.5414400100708 C10.340370178222656,12.044201850891113 9.191434860229492,12.906073570251465 7.622706890106201,12.906073570251465 C5.0155181884765625,12.906073570251465 3.4246866703033447,11.049725532531738 3.4246866703033447,8.022093772888184 C3.4246866703033447,4.95027494430542 5.0155181884765625,3.0939269065856934 7.622706890106201,3.0939269065856934 C9.191434860229492,3.0939269065856934 10.340370178222656,3.9557981491088867 10.914844512939453,5.458559989929199 C10.914844512939453,5.458559989929199 14.427860260009766,5.458559989929199 14.427860260009766,5.458559989929199 C13.566211700439453,2.1436522006988525 10.981111526489258,0 7.622706890106201,0 C3.1595458984375,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1595458984375,16 7.622706890106201,16 C11.003214836120605,16 13.588300704956055,13.834254264831543 14.449976921081543,10.5414400100708 C14.449976921081543,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 C10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708z%27/%3E%3Cpath transform=%27translate(117.83000183105469,0.27000001072883606)%27 d=%27 M0,0 C0,0 6.1677093505859375,15.470022201538086 6.1677093505859375,15.470022201538086 C6.1677093505859375,15.470022201538086 9.550004005432129,15.470022201538086 9.550004005432129,15.470022201538086 C9.550004005432129,15.470022201538086 3.382294178009033,0 3.382294178009033,0 C3.382294178009033,0 0,0 0,0 C0,0 0,0 0,0z%27/%3E%3Cpath transform=%27translate(0,0.27000001072883606)%27 d=%27 M5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 7.93500280380249,3.911694288253784 7.93500280380249,3.911694288253784 C7.93500280380249,3.911694288253784 10.045400619506836,9.348296165466309 10.045400619506836,9.348296165466309 C10.045400619506836,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309z M6.166755199432373,0 C6.166755199432373,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.4480772018432617,15.470022201538086 3.4480772018432617,15.470022201538086 C3.4480772018432617,15.470022201538086 4.709278583526611,12.22130012512207 4.709278583526611,12.22130012512207 C4.709278583526611,12.22130012512207 11.16093635559082,12.22130012512207 11.16093635559082,12.22130012512207 C11.16093635559082,12.22130012512207 12.421928405761719,15.470022201538086 12.421928405761719,15.470022201538086 C12.421928405761719,15.470022201538086 15.87000560760498,15.470022201538086 15.87000560760498,15.470022201538086 C15.87000560760498,15.470022201538086 9.703250885009766,0 9.703250885009766,0 C9.703250885009766,0 6.166755199432373,0 6.166755199432373,0 C6.166755199432373,0 6.166755199432373,0 6.166755199432373,0z%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1284
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 143 16%27%3E%3Cpath transform=%27translate(18.299999237060547,0.27000001072883606)%27 d=%27 M10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 3.756195545196533,0 3.756195545196533,0 C3.756195545196533,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.2038140296936035,15.470022201538086 3.2038140296936035,15.470022201538086 C3.2038140296936035,15.470022201538086 3.2038140296936035,4.6410064697265625 3.2038140296936035,4.6410064697265625 C3.2038140296936035,4.6410064697265625 10.163809776306152,15.470022201538086 10.163809776306152,15.470022201538086 C10.163809776306152,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.716191291809082,0 10.716191291809082,0 C10.716191291809082,0 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 C10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777 10.716191291809082,10.829001426696777z%27/%3E%3Cpath transform=%27translate(34.869998931884766,0.27000001072883606)%27 d=%27 M0,2.983504056930542 C0,2.983504056930542 5.19273567199707,2.983504056930542 5.19273567199707,2.983504056930542 C5.19273567199707,2.983504056930542 5.19273567199707,15.470022201538086 5.19273567199707,15.470022201538086 C5.19273567199707,15.470022201538086 8.507256507873535,15.470022201538086 8.507256507873535,15.470022201538086 C8.507256507873535,15.470022201538086 8.507256507873535,2.983504056930542 8.507256507873535,2.983504056930542 C8.507256507873535,2.983504056930542 13.700006484985352,2.983504056930542 13.700006484985352,2.983504056930542 C13.700006484985352,2.983504056930542 13.700006484985352,0 13.700006484985352,0 C13.700006484985352,0 0,0 0,0 C0,0 0,2.983504056930542 0,2.983504056930542 C0,2.983504056930542 0,2.983504056930542 0,2.983504056930542z%27/%3E%3Cpath transform=%27translate(51.22999954223633,0.27000001072883606)%27 d=%27 M10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 3.3142902851104736,6.165900230407715 3.3142902851104736,6.165900230407715 C3.3142902851104736,6.165900230407715 3.3142902851104736,0 3.3142902851104736,0 C3.3142902851104736,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3142902851104736,15.470022201538086 3.3142902851104736,15.470022201538086 C3.3142902851104736,15.470022201538086 3.3142902851104736,9.149404525756836 3.3142902851104736,9.149404525756836 C3.3142902851104736,9.149404525756836 10.605714797973633,9.149404525756836 10.605714797973633,9.149404525756836 C10.605714797973633,9.149404525756836 10.605714797973633,15.470022201538086 10.605714797973633,15.470022201538086 C10.605714797973633,15.470022201538086 13.919991493225098,15.470022201538086 13.919991493225098,15.470022201538086 C13.919991493225098,15.470022201538086 13.919991493225098,0 13.919991493225098,0 C13.919991493225098,0 10.605714797973633,0 10.605714797973633,0 C10.605714797973633,0 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 C10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715 10.605714797973633,6.165900230407715z%27/%3E%3Cpath transform=%27translate(69.23999786376953,0.27000001072883606)%27 d=%27 M3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 7.403865814208984,2.983504056930542 7.403865814208984,2.983504056930542 C9.03934097290039,2.983504056930542 9.901290893554688,3.5801939964294434 9.901290893554688,4.707304000854492 C9.901290893554688,5.834399700164795 9.03934097290039,6.431103706359863 7.403865814208984,6.431103706359863 C7.403865814208984,6.431103706359863 3.3151700496673584,6.431103706359863 3.3151700496673584,6.431103706359863 C3.3151700496673584,6.431103706359863 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 C3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542 3.3151700496673584,2.983504056930542z M13.216461181640625,4.707304000854492 C13.216461181640625,1.7900969982147217 11.072648048400879,0 7.558576583862305,0 C7.558576583862305,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3151700496673584,15.470022201538086 3.3151700496673584,15.470022201538086 C3.3151700496673584,15.470022201538086 3.3151700496673584,9.414593696594238 3.3151700496673584,9.414593696594238 C3.3151700496673584,9.414593696594238 7.005825519561768,9.414593696594238 7.005825519561768,9.414593696594238 C7.005825519561768,9.414593696594238 10.321218490600586,15.470022201538086 10.321218490600586,15.470022201538086 C10.321218490600586,15.470022201538086 13.990056991577148,15.470022201538086 13.990056991577148,15.470022201538086 C13.990056991577148,15.470022201538086 10.319005966186523,8.953378677368164 10.319005966186523,8.953378677368164 C12.161579132080078,8.245061874389648 13.216461181640625,6.753532409667969 13.216461181640625,4.707304000854492 C13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492 13.216461181640625,4.707304000854492z%27/%3E%3Cpath transform=%27translate(84.98999786376953,0)%27 d=%27 M7.622087478637695,12.906073570251465 C5.015110492706299,12.906073570251465 3.4244225025177,11.049725532531738 3.4244225025177,8.022093772888184 C3.4244225025177,4.95027494430542 5.015110492706299,3.0939269065856934 7.622087478637695,3.0939269065856934 C10.206976890563965,3.0939269065856934 11.775577545166016,4.95027494430542 11.775577545166016,8.022093772888184 C11.775577545166016,11.049725532531738 10.206976890563965,12.906073570251465 7.622087478637695,12.906073570251465 C7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465 7.622087478637695,12.906073570251465z M7.622087478637695,0 C3.1593029499053955,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1593029499053955,16 7.622087478637695,16 C12.062784194946289,16 15.200028419494629,12.685078620910645 15.200028419494629,8.022093772888184 C15.200028419494629,3.3149218559265137 12.062784194946289,0 7.622087478637695,0 C7.622087478637695,0 7.622087478637695,0 7.622087478637695,0z%27/%3E%3Cpath transform=%27translate(103.29000091552734,0.27000001072883606)%27 d=%27 M7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 3.3160574436187744,6.873104095458984 3.3160574436187744,6.873104095458984 C3.3160574436187744,6.873104095458984 3.3160574436187744,2.983504056930542 3.3160574436187744,2.983504056930542 C3.3160574436187744,2.983504056930542 7.405848026275635,2.983504056930542 7.405848026275635,2.983504056930542 C9.04176139831543,2.983504056930542 9.90394115447998,3.646505117416382 9.90394115447998,4.928304195404053 C9.90394115447998,6.2101030349731445 9.04176139831543,6.873104095458984 7.405848026275635,6.873104095458984 C7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984 7.405848026275635,6.873104095458984z M7.5605998039245605,0 C7.5605998039245605,0 0,0 0,0 C0,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.3160574436187744,15.470022201538086 3.3160574436187744,15.470022201538086 C3.3160574436187744,15.470022201538086 3.3160574436187744,9.85659408569336 3.3160574436187744,9.85659408569336 C3.3160574436187744,9.85659408569336 7.5605998039245605,9.85659408569336 7.5605998039245605,9.85659408569336 C11.07561206817627,9.85659408569336 13.219999313354492,8.000200271606445 13.219999313354492,4.928304195404053 C13.219999313354492,1.8563942909240723 11.07561206817627,0 7.5605998039245605,0 C7.5605998039245605,0 7.5605998039245605,0 7.5605998039245605,0z%27/%3E%3Cpath transform=%27translate(128.0399932861328,0)%27 d=%27 M10.914844512939453,10.5414400100708 C10.340370178222656,12.044201850891113 9.191434860229492,12.906073570251465 7.622706890106201,12.906073570251465 C5.0155181884765625,12.906073570251465 3.4246866703033447,11.049725532531738 3.4246866703033447,8.022093772888184 C3.4246866703033447,4.95027494430542 5.0155181884765625,3.0939269065856934 7.622706890106201,3.0939269065856934 C9.191434860229492,3.0939269065856934 10.340370178222656,3.9557981491088867 10.914844512939453,5.458559989929199 C10.914844512939453,5.458559989929199 14.427860260009766,5.458559989929199 14.427860260009766,5.458559989929199 C13.566211700439453,2.1436522006988525 10.981111526489258,0 7.622706890106201,0 C3.1595458984375,0 0,3.3149218559265137 0,8.022093772888184 C0,12.685078620910645 3.1595458984375,16 7.622706890106201,16 C11.003214836120605,16 13.588300704956055,13.834254264831543 14.449976921081543,10.5414400100708 C14.449976921081543,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 C10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708 10.914844512939453,10.5414400100708z%27/%3E%3Cpath transform=%27translate(117.83000183105469,0.27000001072883606)%27 d=%27 M0,0 C0,0 6.1677093505859375,15.470022201538086 6.1677093505859375,15.470022201538086 C6.1677093505859375,15.470022201538086 9.550004005432129,15.470022201538086 9.550004005432129,15.470022201538086 C9.550004005432129,15.470022201538086 3.382294178009033,0 3.382294178009033,0 C3.382294178009033,0 0,0 0,0 C0,0 0,0 0,0z%27/%3E%3Cpath transform=%27translate(0,0.27000001072883606)%27 d=%27 M5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 7.93500280380249,3.911694288253784 7.93500280380249,3.911694288253784 C7.93500280380249,3.911694288253784 10.045400619506836,9.348296165466309 10.045400619506836,9.348296165466309 C10.045400619506836,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 C5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309 5.824605464935303,9.348296165466309z M6.166755199432373,0 C6.166755199432373,0 0,15.470022201538086 0,15.470022201538086 C0,15.470022201538086 3.4480772018432617,15.470022201538086 3.4480772018432617,15.470022201538086 C3.4480772018432617,15.470022201538086 4.709278583526611,12.22130012512207 4.709278583526611,12.22130012512207 C4.709278583526611,12.22130012512207 11.16093635559082,12.22130012512207 11.16093635559082,12.22130012512207 C11.16093635559082,12.22130012512207 12.421928405761719,15.470022201538086 12.421928405761719,15.470022201538086 C12.421928405761719,15.470022201538086 15.87000560760498,15.470022201538086 15.87000560760498,15.470022201538086 C15.87000560760498,15.470022201538086 9.703250885009766,0 9.703250885009766,0 C9.703250885009766,0 6.166755199432373,0 6.166755199432373,0 C6.166755199432373,0 6.166755199432373,0 6.166755199432373,0z%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1285
+ "}",
1286
+ "",
1287
+ "/* ---------- Claude Code layout: new session button ---------- */",
1288
+ "/* Narrow height matching conversation row, persistent hover plate, left-aligned plus icon */",
1289
+ "body[data-dsh-claude-style] button[class*=\"newSession\"] {",
1290
+ " display: flex !important;",
1291
+ " align-items: center !important;",
1292
+ " justify-content: flex-start !important;",
1293
+ " text-align: left !important;",
1294
+ " width: 100% !important;",
1295
+ " box-sizing: border-box !important;",
1296
+ " height: 28px !important;",
1297
+ " line-height: 28px !important;",
1298
+ " padding: 0 8px !important;",
1299
+ " margin: 0 0 6px 0 !important;",
1300
+ " border: none !important;",
1301
+ " border-radius: 6px !important;",
1302
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1303
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1304
+ " font-family: var(--dsw-font-family) !important;",
1305
+ " font-size: 13px !important;",
1306
+ " font-weight: 500 !important;",
1307
+ " cursor: pointer !important;",
1308
+ " box-shadow: none !important;",
1309
+ " transition: background-color 0.12s ease !important;",
1310
+ "}",
1311
+ "body[data-dsh-claude-style] button[class*=\"newSession\"]:hover {",
1312
+ " background: rgba(0, 0, 0, 0.12) !important;",
1313
+ "}",
1314
+ "body[data-dsh-claude-style][data-ds-dark-theme] button[class*=\"newSession\"] {",
1315
+ " color: #f5f4ef !important;",
1316
+ "}",
1317
+ "body[data-dsh-claude-style][data-ds-dark-theme] button[class*=\"newSession\"]:hover {",
1318
+ " background: rgba(255, 255, 255, 0.12) !important;",
1319
+ "}",
1320
+ "body[data-dsh-claude-style] button[class*=\"newSession\"] svg {",
1321
+ " display: none !important;",
1322
+ "}",
1323
+ "body[data-dsh-claude-style] button[class*=\"newSession\"]::before {",
1324
+ " content: \"\";",
1325
+ " display: inline-block !important;",
1326
+ " width: 13px !important;",
1327
+ " height: 13px !important;",
1328
+ " margin-right: 6px !important;",
1329
+ " flex: none !important;",
1330
+ " background-color: currentColor !important;",
1331
+ " -webkit-mask: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='5' x2='12' y2='19'></line><line x1='5' y1='12' x2='19' y2='12'></line></svg>\") center / contain no-repeat !important;",
1332
+ " mask: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='5' x2='12' y2='19'></line><line x1='5' y1='12' x2='19' y2='12'></line></svg>\") center / contain no-repeat !important;",
1333
+ "}",
1334
+ "",
1335
+ "/* ---------- Claude Code layout: workspace & session sidebar ---------- */",
1336
+ "/* 1. Typography: Anthropic Sans and compact font sizes */",
1337
+ "body[data-dsh-claude-style] :is([data-pane=\"sidebar\"], [class*=\"sidebarCol\"], [class*=\"treeBody\"], [role=\"tree\"]) :is([class*=\"title\"], [class*=\"projectText\"], [class*=\"sectionLabel\"], [class*=\"sessionRow\"], [class*=\"projectRow\"], [class*=\"time\"]) {",
1338
+ " font-family: var(--dsw-font-family) !important;",
1339
+ "}",
1340
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"title\"] {",
1341
+ " font-size: 13px !important;",
1342
+ " line-height: 18px !important;",
1343
+ " letter-spacing: normal !important;",
1344
+ "}",
1345
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"title\"] {",
1346
+ " font-size: 13px !important;",
1347
+ " line-height: 18px !important;",
1348
+ " letter-spacing: normal !important;",
1349
+ " color: var(--dsw-alias-label-secondary, #787672) !important;",
1350
+ " transition: color 0.12s ease !important;",
1351
+ "}",
1352
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"sessionRow\"] [class*=\"title\"] {",
1353
+ " color: #8c8983 !important;",
1354
+ "}",
1355
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"]:is(:hover, [class*=\"selected\"], [class*=\"active\"], [class*=\"menuOpen\"], [aria-selected=\"true\"], [data-selected=\"true\"]) [class*=\"title\"] {",
1356
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1357
+ "}",
1358
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"sessionRow\"]:is(:hover, [class*=\"selected\"], [class*=\"active\"], [class*=\"menuOpen\"], [aria-selected=\"true\"], [data-selected=\"true\"]) [class*=\"title\"] {",
1359
+ " color: #f5f4ef !important;",
1360
+ "}",
1361
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"time\"] {",
1362
+ " font-size: 11px !important;",
1363
+ " line-height: 16px !important;",
1364
+ "}",
1365
+ "body[data-dsh-claude-style] [class*=\"sectionLabel\"] {",
1366
+ " font-size: 12px !important;",
1367
+ " line-height: 16px !important;",
1368
+ "}",
1369
+ "",
1370
+ "/* 2. Compact scale: shrunken heights, margins, and paddings */",
1371
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] {",
1372
+ " height: 28px !important;",
1373
+ " min-height: 28px !important;",
1374
+ " padding: 0 6px !important;",
1375
+ " gap: 4px !important;",
1376
+ " border-radius: 6px !important;",
1377
+ "}",
1378
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] {",
1379
+ " height: 28px !important;",
1380
+ " min-height: 28px !important;",
1381
+ " padding: 0 6px !important;",
1382
+ " gap: 0 !important;",
1383
+ " border-radius: 6px !important;",
1384
+ "}",
1385
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"title\"] {",
1386
+ " margin: 0 4px !important;",
1387
+ "}",
1388
+ "body[data-dsh-claude-style] [class*=\"groupSection\"] > * + * {",
1389
+ " margin-top: 1px !important;",
1390
+ "}",
1391
+ "body[data-dsh-claude-style] [class*=\"groupSection\"] + [class*=\"groupSection\"] {",
1392
+ " margin-top: 6px !important;",
1393
+ "}",
1394
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"rowActions\"],",
1395
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"rowActions\"] {",
1396
+ " gap: 6px !important;",
1397
+ "}",
1398
+ "body[data-dsh-claude-style] :is([class*=\"projectRow\"], [class*=\"sessionRow\"]) [class*=\"iconButton\"] {",
1399
+ " width: 16px !important;",
1400
+ " height: 16px !important;",
1401
+ "}",
1402
+ "",
1403
+ "/* 3. Hover & active background: session rows only. A folder row is a heading,",
1404
+ " not a target, so it never takes a hover plate — its hover cue is the label",
1405
+ " darkening (rule 4). This also cancels the shipped",
1406
+ " .projectRow:hover{background:var(--dsw-alias-interactive-bg-hover)}. */",
1407
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"]:hover,",
1408
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"][class*=\"selected\"],",
1409
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"][class*=\"menuOpen\"] {",
1410
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1411
+ "}",
1412
+ "",
1413
+ "body[data-dsh-claude-style] [class*=\"projectRow\"],",
1414
+ "body[data-dsh-claude-style] [class*=\"projectRow\"]:hover,",
1415
+ "body[data-dsh-claude-style] [class*=\"projectRow\"][class*=\"menuOpen\"],",
1416
+ "body[data-dsh-claude-style] [class*=\"projectRow\"][class*=\"selected\"] {",
1417
+ " background: transparent !important;",
1418
+ "}",
1419
+ "",
1420
+ "/* 4. Folder header styling: grey font, remove folder icon, dropdown arrow */",
1421
+ "/* Folder text: muted grey */",
1422
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"title\"] {",
1423
+ " color: var(--dsw-alias-label-secondary, #787672) !important;",
1424
+ " font-weight: 500 !important;",
1425
+ "}",
1426
+ "body[data-dsh-claude-style] [class*=\"projectRow\"]:hover [class*=\"title\"] {",
1427
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1428
+ "}",
1429
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"folderActive\"] {",
1430
+ " color: inherit !important;",
1431
+ "}",
1432
+ "/* Cancel folder icon */",
1433
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"folder\"] {",
1434
+ " display: none !important;",
1435
+ "}",
1436
+ "/* Project row flex layout: Title on the left, dropdown arrow next to title */",
1437
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] {",
1438
+ " display: flex !important;",
1439
+ " align-items: center !important;",
1440
+ "}",
1441
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"projectText\"] {",
1442
+ " order: 1 !important;",
1443
+ " flex: 0 0 auto !important;",
1444
+ " margin-right: 2px !important;",
1445
+ "}",
1446
+ "/* The chevron is a reveal-on-hover affordance, never a resting one. The",
1447
+ " shipped CSS gates it on .projectRow:hover alone, which drops it the moment",
1448
+ " the pointer moves down into the folder's conversation list; :has() on the",
1449
+ " group section widens the trigger to the folder row or any row inside it. */",
1450
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"chevron\"] {",
1451
+ " order: 2 !important;",
1452
+ " display: none !important;",
1453
+ " width: 14px !important;",
1454
+ " height: 14px !important;",
1455
+ " align-items: center !important;",
1456
+ " justify-content: center !important;",
1457
+ " color: var(--dsw-alias-label-secondary, #787672) !important;",
1458
+ "}",
1459
+ "body[data-dsh-claude-style] [class*=\"groupSection\"]:has(:is([class*=\"projectRow\"], [class*=\"sessionRow\"]):hover) [class*=\"projectRow\"] [class*=\"chevron\"] {",
1460
+ " display: inline-flex !important;",
1461
+ "}",
1462
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"rowActions\"] {",
1463
+ " order: 3 !important;",
1464
+ " margin-left: auto !important;",
1465
+ "}",
1466
+ "/* Cancel solid lower triangle, replace with dropdown menu arrow */",
1467
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"chevron\"] svg {",
1468
+ " display: none !important;",
1469
+ "}",
1470
+ "body[data-dsh-claude-style] [class*=\"projectRow\"] [class*=\"chevron\"]::after {",
1471
+ " content: \"\";",
1472
+ " display: inline-block;",
1473
+ " width: 12px;",
1474
+ " height: 12px;",
1475
+ " background: currentColor;",
1476
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1477
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E\") center / contain no-repeat;",
1478
+ " transition: transform 0.15s var(--ds-ease-in-out, ease);",
1479
+ "}",
1480
+ "body[data-dsh-claude-style] [class*=\"projectRow\"][aria-expanded=\"false\"] [class*=\"chevron\"]::after {",
1481
+ " transform: rotate(-90deg);",
1482
+ "}",
1483
+ "/* Session status circle indicator (matching Claude style) */",
1484
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"slot\"] {",
1485
+ " width: 14px !important;",
1486
+ " height: 16px !important;",
1487
+ " display: inline-flex !important;",
1488
+ " align-items: center !important;",
1489
+ " justify-content: center !important;",
1490
+ "}",
1491
+ "body[data-dsh-claude-style] [class*=\"sessionRow\"] [class*=\"slot\"]:empty::after {",
1492
+ " content: \"\";",
1493
+ " display: inline-block;",
1494
+ " width: 5px;",
1495
+ " height: 5px;",
1496
+ " border-radius: 50%;",
1497
+ " border: 1.2px solid var(--dsw-alias-label-caption, #a6a094);",
1498
+ " box-sizing: border-box;",
1499
+ "}",
1500
+ "",
1501
+ "/* Session status ongoing indicator: Windows 11 circular progress ring (replaces blue square matrix) */",
1502
+ "body[data-dsh-claude-style] svg[data-state=\"ongoing\"] {",
1503
+ " width: 10px !important;",
1504
+ " height: 10px !important;",
1505
+ " box-sizing: border-box !important;",
1506
+ " border-radius: 50% !important;",
1507
+ " border: 1.5px solid rgba(255, 255, 255, 0.18) !important;",
1508
+ " border-top-color: #faf9f5 !important;",
1509
+ " animation: 0.85s linear infinite dsh-claude-win11-spin !important;",
1510
+ " transform-origin: center center !important;",
1511
+ " display: inline-block !important;",
1512
+ " flex: none !important;",
1513
+ " color: transparent !important;",
1514
+ " fill: none !important;",
1515
+ " background: transparent !important;",
1516
+ "}",
1517
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) svg[data-state=\"ongoing\"] {",
1518
+ " border-color: rgba(20, 20, 19, 0.12) !important;",
1519
+ " border-top-color: #6e6a60 !important;",
1520
+ "}",
1521
+ "body[data-dsh-claude-style] svg[data-state=\"ongoing\"] * {",
1522
+ " display: none !important;",
1523
+ "}",
1524
+ "@keyframes dsh-claude-win11-spin {",
1525
+ " 0% { transform: rotate(0deg); }",
1526
+ " 100% { transform: rotate(360deg); }",
1527
+ "}",
1528
+ "@media (prefers-reduced-motion: reduce) {",
1529
+ " body[data-dsh-claude-style] svg[data-state=\"ongoing\"] {",
1530
+ " animation: none !important;",
1531
+ " }",
1532
+ "}",
1533
+ "",
1534
+ "/* Turn status: Claude thinking indicator (terracotta accent shimmer) */",
1535
+ "body[data-dsh-claude-style] [class*=\"turnStatus\"]:not([class*=\"Clock\"]):not([class*=\"clock\"]) {",
1536
+ " background: linear-gradient(90deg, #d97757 0%, #d97757 40%, #f3b5a3 50%, #d97757 60%, #d97757 100%);",
1537
+ " background-position: 100% 0;",
1538
+ " background-size: 250% 100%;",
1539
+ " -webkit-background-clip: text;",
1540
+ " background-clip: text;",
1541
+ " -webkit-text-fill-color: transparent;",
1542
+ " color: transparent;",
1543
+ " animation: 1.8s linear infinite dsh-claude-turn-status-shimmer;",
1544
+ "}",
1545
+ "@keyframes dsh-claude-turn-status-shimmer {",
1546
+ " to { background-position: 0 0; }",
1547
+ "}",
1548
+ "@media (prefers-reduced-motion: reduce) {",
1549
+ " body[data-dsh-claude-style] [class*=\"turnStatus\"]:not([class*=\"Clock\"]):not([class*=\"clock\"]) {",
1550
+ " background-position: 0 0;",
1551
+ " background-size: 100% 100%;",
1552
+ " animation: none;",
1553
+ " }",
1554
+ "}",
1555
+ "",
1556
+ "/* --- 2.4 Custom Components (Segments & Account Popover) --- */",
1557
+ "/* ---------- Claude Code layout: permission segments ---------- */",
1558
+ "/* The shipped access control is one popup-select button; it is replaced by",
1559
+ " a Read | Edit | Auto segmented control over the same three presets. */",
1560
+ "body[data-dsh-claude-style] button[aria-label^=\"访问模式\"],",
1561
+ "body[data-dsh-claude-style] button[aria-label^=\"Access mode\"] {",
1562
+ " display: none !important;",
1563
+ "}",
1564
+ "",
1565
+ "body[data-dsh-claude-style] .dsh-claude-segments {",
1566
+ " flex: none;",
1567
+ " align-items: center;",
1568
+ " gap: 2px;",
1569
+ " padding: 2px;",
1570
+ " border-radius: 7px;",
1571
+ " background: var(--dsw-specific-selector);",
1572
+ " display: inline-flex;",
1573
+ "}",
1574
+ "",
1575
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-segments {",
1576
+ " background: #f6f6f4;",
1577
+ "}",
1578
+ "",
1579
+ "body[data-dsh-claude-style] .dsh-claude-segment {",
1580
+ " appearance: none;",
1581
+ " margin: 0;",
1582
+ " border: 0;",
1583
+ " cursor: pointer;",
1584
+ " background: transparent;",
1585
+ " color: var(--dsw-alias-label-secondary);",
1586
+ " font: inherit;",
1587
+ " font-size: 14px;",
1588
+ " font-weight: 500;",
1589
+ " line-height: 18px;",
1590
+ " padding: 3px 12px;",
1591
+ " border-radius: 7px;",
1592
+ " transition: background-color .1s, color .1s;",
1593
+ "}",
1594
+ "",
1595
+ "body[data-dsh-claude-style] .dsh-claude-segment:hover:not([data-active]) {",
1596
+ " color: var(--dsw-alias-label-primary);",
1597
+ "}",
1598
+ "",
1599
+ "body[data-dsh-claude-style] .dsh-claude-segment[data-active] {",
1600
+ " color: var(--dsw-alias-label-primary);",
1601
+ " background: var(--dsw-alias-bg-layer-3);",
1602
+ "}",
1603
+ "",
1604
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-segment[data-active] {",
1605
+ " background: var(--dsw-alias-bg-overlay);",
1606
+ " box-shadow: 0 1px 2px rgba(20, 20, 19, 0.08);",
1607
+ "}",
1608
+ "",
1609
+ "/* ---------- Claude Code layout: in-conversation permission popover ---------- */",
1610
+ "body[data-dsh-claude-style] .dsh-claude-perm-container {",
1611
+ " position: relative !important;",
1612
+ " display: inline-flex !important;",
1613
+ " z-index: 20 !important;",
1614
+ "}",
1615
+ "body[data-dsh-claude-style] .dsh-claude-perm-btn {",
1616
+ " display: inline-flex !important;",
1617
+ " align-items: center !important;",
1618
+ " gap: 4px !important;",
1619
+ " height: 24px !important;",
1620
+ " padding: 0 6px 0 6px !important;",
1621
+ " border-radius: 6px !important;",
1622
+ " border: none !important;",
1623
+ " background: transparent !important;",
1624
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1625
+ " font-family: var(--dsw-font-family) !important;",
1626
+ " font-size: 13px !important;",
1627
+ " font-weight: 500 !important;",
1628
+ " cursor: pointer !important;",
1629
+ " user-select: none !important;",
1630
+ " transition: background-color 0.12s ease !important;",
1631
+ "}",
1632
+ "body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-perm-btn {",
1633
+ " color: #faf9f5 !important;",
1634
+ "}",
1635
+ "body[data-dsh-claude-style] .dsh-claude-perm-btn:hover,",
1636
+ "body[data-dsh-claude-style] .dsh-claude-perm-btn[data-open=\"true\"] {",
1637
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1638
+ "}",
1639
+ "body[data-dsh-claude-style] .dsh-claude-perm-chevron {",
1640
+ " width: 12px;",
1641
+ " height: 12px;",
1642
+ " display: inline-flex;",
1643
+ " align-items: center;",
1644
+ " justify-content: center;",
1645
+ " color: var(--dsw-alias-label-secondary);",
1646
+ "}",
1647
+ "body[data-dsh-claude-style] .dsh-claude-perm-chevron::after {",
1648
+ " content: \"\";",
1649
+ " display: inline-block;",
1650
+ " width: 10px;",
1651
+ " height: 10px;",
1652
+ " background: currentColor;",
1653
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\") center / contain no-repeat;",
1654
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\") center / contain no-repeat;",
1655
+ " transition: transform 0.15s ease;",
1656
+ "}",
1657
+ "body[data-dsh-claude-style] .dsh-claude-perm-btn[data-open=\"true\"] .dsh-claude-perm-chevron::after {",
1658
+ " transform: rotate(180deg);",
1659
+ "}",
1660
+ "body[data-dsh-claude-style] .dsh-claude-perm-popover {",
1661
+ " position: fixed !important;",
1662
+ " min-width: 220px !important;",
1663
+ " background: var(--dsw-alias-bg-overlay, #ffffff) !important;",
1664
+ " border: 1px solid var(--dsw-alias-border-l1, #e8e6dc) !important;",
1665
+ " border-radius: 12px !important;",
1666
+ " box-shadow: 0 8px 30px rgba(20, 20, 19, 0.12), 0 2px 8px rgba(20, 20, 19, 0.06) !important;",
1667
+ " padding: 6px !important;",
1668
+ " box-sizing: border-box !important;",
1669
+ " z-index: 99999 !important;",
1670
+ " display: flex !important;",
1671
+ " flex-direction: column !important;",
1672
+ " gap: 2px !important;",
1673
+ " opacity: 0 !important;",
1674
+ " pointer-events: none !important;",
1675
+ " transform: translateY(4px) scale(0.98) !important;",
1676
+ " transform-origin: bottom left !important;",
1677
+ " transition: opacity 0.15s ease, transform 0.15s ease !important;",
1678
+ "}",
1679
+ "body[data-dsh-claude-style] .dsh-claude-perm-popover[data-open=\"true\"] {",
1680
+ " opacity: 1 !important;",
1681
+ " pointer-events: auto !important;",
1682
+ " transform: translateY(0) scale(1) !important;",
1683
+ "}",
1684
+ "body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-perm-popover {",
1685
+ " background: #1e1e1d !important;",
1686
+ " border-color: #2e2c29 !important;",
1687
+ " box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3) !important;",
1688
+ "}",
1689
+ "",
1690
+ "/* ---------- Claude Code layout: account row & floating popover ---------- */",
1691
+ "/* footArea positioning with crisp hairline border spanning entire sidebar */",
1692
+ "body[data-dsh-claude-style] [class*=\"footArea\"] {",
1693
+ " position: relative !important;",
1694
+ " overflow: visible !important;",
1695
+ " margin: 0 calc(-1 * var(--dsh-sidebar-inline-padding, 12px)) -6px !important;",
1696
+ " padding: 8px var(--dsh-sidebar-inline-padding, 12px) 6px !important;",
1697
+ " border-top: 1px solid var(--dsw-alias-border-l1, #e8e6dc) !important;",
1698
+ " background: transparent !important;",
1699
+ " box-sizing: border-box !important;",
1700
+ "}",
1701
+ "body[data-dsh-claude-style][data-ds-dark-theme] [class*=\"footArea\"] {",
1702
+ " border-top-color: #2e2c29 !important;",
1703
+ "}",
1704
+ "",
1705
+ "/* Account trigger button in sidebar */",
1706
+ "body[data-dsh-claude-style] .dsh-claude-account-btn {",
1707
+ " display: flex !important;",
1708
+ " align-items: center !important;",
1709
+ " width: 100% !important;",
1710
+ " height: 32px !important;",
1711
+ " box-sizing: border-box !important;",
1712
+ " padding: 0 8px !important;",
1713
+ " margin: 0 !important;",
1714
+ " border-radius: 6px !important;",
1715
+ " cursor: pointer !important;",
1716
+ " user-select: none !important;",
1717
+ " background: transparent !important;",
1718
+ " transition: background-color 0.12s ease !important;",
1719
+ "}",
1720
+ "body[data-dsh-claude-style] .dsh-claude-account-btn:hover,",
1721
+ "body[data-dsh-claude-style] .dsh-claude-account-btn[data-open=\"true\"] {",
1722
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1723
+ "}",
1724
+ "body[data-dsh-claude-style] .dsh-claude-account-avatar {",
1725
+ " width: 18px;",
1726
+ " height: 18px;",
1727
+ " background: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z' fill='%23D97757'/%3E%3C/svg%3E\") center / contain no-repeat;",
1728
+ " flex: none;",
1729
+ " margin-right: 8px;",
1730
+ "}",
1731
+ "body[data-dsh-claude-style] .dsh-claude-account-label {",
1732
+ " flex: 1;",
1733
+ " min-width: 0;",
1734
+ " overflow: hidden;",
1735
+ " text-overflow: ellipsis;",
1736
+ " white-space: nowrap;",
1737
+ " font-size: 13px;",
1738
+ " line-height: 18px;",
1739
+ " font-family: var(--dsw-font-family);",
1740
+ "}",
1741
+ "body[data-dsh-claude-style] .dsh-claude-account-user {",
1742
+ " font-weight: 500;",
1743
+ " color: var(--dsw-alias-label-primary);",
1744
+ "}",
1745
+ "body[data-dsh-claude-style] .dsh-claude-account-chevron {",
1746
+ " width: 14px;",
1747
+ " height: 14px;",
1748
+ " flex: none;",
1749
+ " color: var(--dsw-alias-label-secondary);",
1750
+ " display: inline-flex;",
1751
+ " align-items: center;",
1752
+ " justify-content: center;",
1753
+ " margin-left: auto;",
1754
+ "}",
1755
+ "body[data-dsh-claude-style] .dsh-claude-account-chevron::after {",
1756
+ " content: \"\";",
1757
+ " display: inline-block;",
1758
+ " width: 12px;",
1759
+ " height: 12px;",
1760
+ " background: currentColor;",
1761
+ " -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\") center / contain no-repeat;",
1762
+ " mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E\") center / contain no-repeat;",
1763
+ " transition: transform 0.15s ease;",
1764
+ "}",
1765
+ "body[data-dsh-claude-style] .dsh-claude-account-btn[data-open=\"true\"] .dsh-claude-account-chevron::after {",
1766
+ " transform: rotate(180deg);",
1767
+ "}",
1768
+ "",
1769
+ "/* Floating Popover Container: Adaptive Width */",
1770
+ "body[data-dsh-claude-style] .dsh-claude-account-popover {",
1771
+ " position: absolute !important;",
1772
+ " bottom: calc(100% + 4px) !important;",
1773
+ " left: 8px !important;",
1774
+ " right: 8px !important;",
1775
+ " width: auto !important;",
1776
+ " max-width: calc(100% - 16px) !important;",
1777
+ " min-width: 0 !important;",
1778
+ " background: var(--dsw-alias-bg-overlay, #ffffff) !important;",
1779
+ " border: 1px solid var(--dsw-alias-border-l1, #e8e6dc) !important;",
1780
+ " border-radius: 12px !important;",
1781
+ " box-shadow: 0 8px 30px rgba(20, 20, 19, 0.12), 0 2px 8px rgba(20, 20, 19, 0.06) !important;",
1782
+ " padding: 6px !important;",
1783
+ " box-sizing: border-box !important;",
1784
+ " z-index: 1000 !important;",
1785
+ " display: flex !important;",
1786
+ " flex-direction: column !important;",
1787
+ " gap: 2px !important;",
1788
+ " opacity: 0 !important;",
1789
+ " pointer-events: none !important;",
1790
+ " transform: translateY(6px) scale(0.98) !important;",
1791
+ " transform-origin: bottom left !important;",
1792
+ " transition: opacity 0.15s ease, transform 0.15s ease !important;",
1793
+ "}",
1794
+ "body[data-dsh-claude-style] .dsh-claude-account-popover[data-open=\"true\"] {",
1795
+ " opacity: 1 !important;",
1796
+ " pointer-events: auto !important;",
1797
+ " transform: translateY(0) scale(1) !important;",
1798
+ "}",
1799
+ "body[data-dsh-claude-style][data-ds-dark-theme] .dsh-claude-account-popover {",
1800
+ " background: #1e1e1d !important;",
1801
+ " border-color: #2e2c29 !important;",
1802
+ " box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3) !important;",
1803
+ "}",
1804
+ "/* Hover bridge between trigger and popover */",
1805
+ "body[data-dsh-claude-style] .dsh-claude-account-popover::after {",
1806
+ " content: \"\";",
1807
+ " position: absolute;",
1808
+ " top: 100%;",
1809
+ " left: 0;",
1810
+ " right: 0;",
1811
+ " height: 12px;",
1812
+ " background: transparent;",
1813
+ "}",
1814
+ "",
1815
+ "/* Popover Header */",
1816
+ "body[data-dsh-claude-style] .dsh-claude-account-popover-header {",
1817
+ " padding: 6px 8px 6px 8px !important;",
1818
+ " display: flex !important;",
1819
+ " flex-direction: column !important;",
1820
+ " gap: 2px !important;",
1821
+ "}",
1822
+ "body[data-dsh-claude-style] .dsh-claude-account-popover-name {",
1823
+ " font-size: 14px !important;",
1824
+ " font-weight: 600 !important;",
1825
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1826
+ " line-height: 18px !important;",
1827
+ " font-family: var(--dsw-font-family) !important;",
1828
+ "}",
1829
+ "body[data-dsh-claude-style] .dsh-claude-account-popover-divider {",
1830
+ " height: 1px !important;",
1831
+ " background: var(--dsw-alias-border-l1, #e8e6dc) !important;",
1832
+ " margin: 2px 0 4px 0 !important;",
1833
+ " flex: none !important;",
1834
+ "}",
1835
+ "",
1836
+ "/* Popover Body & Items */",
1837
+ "body[data-dsh-claude-style] .dsh-claude-account-popover-body {",
1838
+ " display: flex !important;",
1839
+ " flex-direction: column !important;",
1840
+ " gap: 2px !important;",
1841
+ " max-height: 360px !important;",
1842
+ " overflow-y: auto !important;",
1843
+ "}",
1844
+ "body[data-dsh-claude-style] .dsh-claude-popover-item {",
1845
+ " width: 100% !important;",
1846
+ " height: 32px !important;",
1847
+ " min-height: 32px !important;",
1848
+ " padding: 0 8px !important;",
1849
+ " border-radius: 6px !important;",
1850
+ " border: none !important;",
1851
+ " background: transparent !important;",
1852
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1853
+ " font-size: 13px !important;",
1854
+ " font-weight: 400 !important;",
1855
+ " display: flex !important;",
1856
+ " align-items: center !important;",
1857
+ " justify-content: flex-start !important;",
1858
+ " gap: 8px !important;",
1859
+ " box-shadow: none !important;",
1860
+ " cursor: pointer !important;",
1861
+ " font-family: var(--dsw-font-family) !important;",
1862
+ " transition: background-color 0.12s ease !important;",
1863
+ " box-sizing: border-box !important;",
1864
+ "}",
1865
+ "body[data-dsh-claude-style] .dsh-claude-popover-item:hover {",
1866
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08)) !important;",
1867
+ " color: var(--dsw-alias-label-primary, #141413) !important;",
1868
+ "}",
1869
+ "body[data-dsh-claude-style] .dsh-claude-popover-item-icon {",
1870
+ " display: inline-flex !important;",
1871
+ " align-items: center !important;",
1872
+ " justify-content: center !important;",
1873
+ " width: 16px !important;",
1874
+ " height: 16px !important;",
1875
+ " flex: none !important;",
1876
+ " color: var(--dsw-alias-label-secondary, #787672) !important;",
1877
+ "}",
1878
+ "body[data-dsh-claude-style] .dsh-claude-popover-item-icon svg {",
1879
+ " width: 16px !important;",
1880
+ " height: 16px !important;",
1881
+ "}",
1882
+ "body[data-dsh-claude-style] .dsh-claude-popover-item-text {",
1883
+ " flex: 1 !important;",
1884
+ " min-width: 0 !important;",
1885
+ " overflow: hidden !important;",
1886
+ " text-overflow: ellipsis !important;",
1887
+ " white-space: nowrap !important;",
1888
+ " text-align: left !important;",
1889
+ "}",
1890
+ "body[data-dsh-claude-style] .dsh-claude-popover-item-shortcut {",
1891
+ " margin-left: auto !important;",
1892
+ " font-size: 11px !important;",
1893
+ " color: var(--dsw-alias-label-tertiary, #a6a094) !important;",
1894
+ " font-family: var(--ds-font-family-code, monospace) !important;",
1895
+ " padding-left: 8px !important;",
1896
+ "}",
1897
+ "body[data-dsh-claude-style] .dsh-claude-popover-item-badge {",
1898
+ " margin-left: auto !important;",
1899
+ " font-size: 10px !important;",
1900
+ " line-height: 14px !important;",
1901
+ " padding: 0 5px !important;",
1902
+ " border-radius: 8px !important;",
1903
+ " background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.08)) !important;",
1904
+ " color: var(--dsw-alias-label-secondary, #787672) !important;",
1905
+ "}",
1906
+ "",
1907
+ "/* Ensure popover items only display inside the popover */",
1908
+ "body[data-dsh-claude-style] [class*=\"footArea\"] > .dsh-claude-popover-item {",
1909
+ " display: none !important;",
1910
+ "}",
1911
+ "",
1912
+ "/* Hide original trigger buttons in footArea while keeping containers intact for modals */",
1913
+ "body[data-dsh-claude-style] [class*=\"footArea\"] > [class*=\"settingsArea\"] > [class*=\"triggerRow\"],",
1914
+ "body[data-dsh-claude-style] [class*=\"footArea\"] > [class*=\"footerActions\"] :is([class*=\"footerButtons\"], > button) {",
1915
+ " display: none !important;",
1916
+ "}",
1917
+ "body[data-dsh-claude-style] [class*=\"footArea\"] > [class*=\"settingsArea\"],",
1918
+ "body[data-dsh-claude-style] [class*=\"footArea\"] > [class*=\"footerActions\"] {",
1919
+ " position: static !important;",
1920
+ " width: 0 !important;",
1921
+ " height: 0 !important;",
1922
+ " margin: 0 !important;",
1923
+ " padding: 0 !important;",
1924
+ " line-height: 0 !important;",
1925
+ " font-size: 0 !important;",
1926
+ " overflow: visible !important;",
1927
+ "}",
1928
+ "",
1929
+ "/* Generic footer-action redirection. The `sidebar.footer.action` slot accepts",
1930
+ " arbitrary plugin controls, not just buttons; overrides.js marks every",
1931
+ " mirrored entry (`data-dsh-claude-footer-entry`) and hides it in place",
1932
+ " (`data-dsh-claude-footer-hidden`) once it is redirected into the account",
1933
+ " popover. Entries that host a floating overlay (a fixed panel or dialog)",
1934
+ " keep their subtree visible — the overlay must stay reachable after the",
1935
+ " mirrored popover item opens it — but the entry box itself collapses so it",
1936
+ " never paints inside the zero-sized footerActions container. */",
1937
+ "body[data-dsh-claude-style] [class*=\"footArea\"] [data-dsh-claude-footer-hidden] {",
1938
+ " display: none !important;",
1939
+ "}",
1940
+ "body[data-dsh-claude-style] [class*=\"footArea\"] [data-dsh-claude-footer-entry] {",
1941
+ " width: 0 !important;",
1942
+ " height: 0 !important;",
1943
+ " min-width: 0 !important;",
1944
+ " min-height: 0 !important;",
1945
+ " margin: 0 !important;",
1946
+ " padding: 0 !important;",
1947
+ " border: none !important;",
1948
+ " background: transparent !important;",
1949
+ " box-shadow: none !important;",
1950
+ " overflow: visible !important;",
1951
+ "}",
1952
+ "",
1953
+ "/* Collapsed rail mode adaptations */",
1954
+ "body[data-dsh-claude-style] [class*=\"root\"][class*=\"collapsed\"] .dsh-claude-account-btn {",
1955
+ " width: 36px !important;",
1956
+ " height: 36px !important;",
1957
+ " padding: 0 !important;",
1958
+ " justify-content: center !important;",
1959
+ "}",
1960
+ "body[data-dsh-claude-style] [class*=\"root\"][class*=\"collapsed\"] .dsh-claude-account-avatar {",
1961
+ " margin-right: 0 !important;",
1962
+ "}",
1963
+ "body[data-dsh-claude-style] [class*=\"root\"][class*=\"collapsed\"] :is(.dsh-claude-account-label, .dsh-claude-account-chevron) {",
1964
+ " display: none !important;",
1965
+ "}",
1966
+ "body[data-dsh-claude-style] [class*=\"root\"][class*=\"collapsed\"] .dsh-claude-account-popover {",
1967
+ " left: calc(100% + 8px) !important;",
1968
+ " bottom: 0 !important;",
1969
+ " right: auto !important;",
1970
+ " width: 220px !important;",
1971
+ " transform-origin: bottom left !important;",
1972
+ "}",
1973
+ "",
1974
+ "/* Embedded footer widgets: display-only plugin entries (progress bars,",
1975
+ " status panels — the cost-meter balance/quota stack is the known case)",
1976
+ " cannot collapse into a text menu item, so overrides.js embeds a live clone",
1977
+ " of the entry into the popover. The embed sits above the action items with",
1978
+ " a hairline separator; the cloned plugin markup keeps its own classes, so",
1979
+ " the plugin's own stylesheet styles the content. */",
1980
+ "body[data-dsh-claude-style] .dsh-claude-popover-embed {",
1981
+ " padding: 2px 2px 6px;",
1982
+ " margin-bottom: 4px;",
1983
+ " border-bottom: 1px solid var(--dsw-alias-border-l2, #2e2c29);",
1984
+ " border-radius: 7px;",
1985
+ "}",
1986
+ "",
1987
+ "body[data-dsh-claude-style] .dsh-claude-popover-embed[data-clickable] {",
1988
+ " cursor: pointer;",
1989
+ "}",
1990
+ "",
1991
+ "body[data-dsh-claude-style] .dsh-claude-popover-embed[data-clickable]:hover {",
1992
+ " background: var(--dsh-claude-hover-bg, rgba(0, 0, 0, 0.08));",
1993
+ "}",
1994
+ "",
1995
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-popover-embed {",
1996
+ " border-bottom-color: #e8e6dc;",
1997
+ "}",
1998
+ "",
1999
+ "/* ---------- Third-party repair: dsh-agy-link run_code fallback card ---------- */",
2000
+ "/* The agy-link bridge replaces the host run_code tool card with its own keyed",
2001
+ " toolview; its non-mirror fallback ships an unstyled header (two bare spans,",
2002
+ " not even a gap) and a bare pre. Give the header the tool-row rhythm, the",
2003
+ " tool name the skin's technical-meta mono voice (overriding the editorial",
2004
+ " serif the `[class*=\"title\"]` rule lends it), the variant label a real",
2005
+ " pill, and the code preview card padding. */",
2006
+ "body[data-dsh-claude-style] .agy-tv-header {",
2007
+ " display: flex;",
2008
+ " align-items: center;",
2009
+ " gap: 8px;",
2010
+ " min-height: 24px;",
2011
+ "}",
2012
+ "body[data-dsh-claude-style] .agy-tv-title {",
2013
+ " font-family: var(--dsw-font-code);",
2014
+ " font-weight: 500;",
2015
+ " font-size: 12px;",
2016
+ " letter-spacing: 0;",
2017
+ " line-height: 24px;",
2018
+ " color: var(--dsw-alias-label-secondary);",
2019
+ "}",
2020
+ "body[data-dsh-claude-style] .agy-tv-badge {",
2021
+ " font-family: var(--dsw-font-code);",
2022
+ " font-size: 11px;",
2023
+ " line-height: 16px;",
2024
+ " padding: 0 6px;",
2025
+ " border-radius: 9999px;",
2026
+ " background: var(--dsw-alias-interactive-bg-hover);",
2027
+ " color: var(--dsw-alias-label-tertiary);",
2028
+ "}",
2029
+ "body[data-dsh-claude-style] .agy-tv-pre {",
2030
+ " padding: 10px 12px;",
2031
+ " overflow-x: auto;",
2032
+ "}",
2033
+ "",
2034
+ "/* ---------- Claude Code layout: settings section (brand) ---------- */",
2035
+ "/* The skin's own page in the settings dialog. It borrows the composer's",
2036
+ " segment language so the two controls read as one design. */",
2037
+ "body[data-dsh-claude-style] .dsh-claude-brand-section {",
2038
+ " display: flex;",
2039
+ " flex-direction: column;",
2040
+ " gap: 16px;",
2041
+ " padding: 20px 24px;",
2042
+ " max-width: 640px;",
2043
+ " box-sizing: border-box;",
2044
+ " font-family: var(--dsw-font-family);",
2045
+ "}",
2046
+ "",
2047
+ "body[data-dsh-claude-style] .dsh-claude-brand-title {",
2048
+ " font-size: 15px;",
2049
+ " font-weight: 600;",
2050
+ " color: var(--dsw-alias-label-primary);",
2051
+ "}",
2052
+ "",
2053
+ "body[data-dsh-claude-style] .dsh-claude-brand-card {",
2054
+ " display: flex;",
2055
+ " align-items: center;",
2056
+ " gap: 12px;",
2057
+ " padding: 12px 14px;",
2058
+ " border: 1px solid var(--dsw-alias-border-l1);",
2059
+ " border-radius: 12px;",
2060
+ "}",
2061
+ "",
2062
+ "body[data-dsh-claude-style] .dsh-claude-brand-card-text {",
2063
+ " flex: 1;",
2064
+ " min-width: 0;",
2065
+ "}",
2066
+ "",
2067
+ "body[data-dsh-claude-style] .dsh-claude-brand-card-title {",
2068
+ " font-size: 13px;",
2069
+ " font-weight: 600;",
2070
+ " line-height: 1.5;",
2071
+ " color: var(--dsw-alias-label-primary);",
2072
+ "}",
2073
+ "",
2074
+ "body[data-dsh-claude-style] .dsh-claude-brand-card-desc {",
2075
+ " margin-top: 4px;",
2076
+ " font-size: 12px;",
2077
+ " line-height: 1.5;",
2078
+ " color: var(--dsw-alias-label-tertiary);",
2079
+ "}",
2080
+ "",
2081
+ "body[data-dsh-claude-style] .dsh-claude-brand-segments {",
2082
+ " flex: none;",
2083
+ " display: inline-flex;",
2084
+ " align-items: center;",
2085
+ " gap: 2px;",
2086
+ " padding: 2px;",
2087
+ " border-radius: 7px;",
2088
+ " background: var(--dsw-specific-selector);",
2089
+ "}",
2090
+ "",
2091
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-brand-segments {",
2092
+ " background: #f6f6f4;",
2093
+ "}",
2094
+ "",
2095
+ "body[data-dsh-claude-style] .dsh-claude-brand-option {",
2096
+ " appearance: none;",
2097
+ " margin: 0;",
2098
+ " border: 0;",
2099
+ " cursor: pointer;",
2100
+ " background: transparent;",
2101
+ " color: var(--dsw-alias-label-secondary);",
2102
+ " font: inherit;",
2103
+ " font-size: 13px;",
2104
+ " font-weight: 500;",
2105
+ " line-height: 18px;",
2106
+ " padding: 3px 12px;",
2107
+ " border-radius: 7px;",
2108
+ " transition: background-color .1s, color .1s;",
2109
+ "}",
2110
+ "",
2111
+ "body[data-dsh-claude-style] .dsh-claude-brand-option:hover:not([data-active=\"true\"]) {",
2112
+ " color: var(--dsw-alias-label-primary);",
2113
+ "}",
2114
+ "",
2115
+ "body[data-dsh-claude-style] .dsh-claude-brand-option[data-active=\"true\"] {",
2116
+ " color: var(--dsw-alias-label-primary);",
2117
+ " background: var(--dsw-alias-bg-layer-3);",
2118
+ "}",
2119
+ "",
2120
+ "body[data-dsh-claude-style]:not([data-ds-dark-theme]) .dsh-claude-brand-option[data-active=\"true\"] {",
2121
+ " background: var(--dsw-alias-bg-overlay);",
2122
+ " box-shadow: 0 1px 2px rgba(20, 20, 19, 0.08);",
2123
+ "}",
2124
+ ].join('\n')
2125
+
2126
+ // ============================================================================
2127
+ // Zone 3: 宿主上下文与通用辅助 (DSH Context & Helpers)
2128
+ // ============================================================================
2129
+ function findAccessTrigger() {
2130
+ var prefixes = ['访问模式', 'Access mode']
2131
+ var buttons = document.querySelectorAll('button[aria-label]')
2132
+ for (var i = 0; i < buttons.length; i++) {
2133
+ var label = buttons[i].getAttribute('aria-label') || ''
2134
+ for (var j = 0; j < prefixes.length; j++) {
2135
+ if (label.indexOf(prefixes[j]) === 0) return buttons[i]
2136
+ }
2137
+ }
2138
+ return null
2139
+ }
2140
+
2141
+ function currentSession(ctx) {
2142
+ var sessions = ctx.get('sessions')
2143
+ if (sessions === void 0 || sessions === null) return null
2144
+ var id = sessions.list.getSnapshot().current
2145
+ if (id === void 0) return null
2146
+ var binding = sessions.binding(id)
2147
+ if (binding === void 0 || binding === null) return null
2148
+ return binding.session === void 0 ? null : binding.session
2149
+ }
2150
+
2151
+ function currentPreset(session) {
2152
+ try {
2153
+ var snapshot = session.projections.faceOf('permissions').getSnapshot()
2154
+ return snapshot === void 0 ? null : snapshot.currentValue
2155
+ } catch (error) {
2156
+ return null
2157
+ }
2158
+ }
2159
+
2160
+ /**
2161
+ * Read the persisted brand choice.
2162
+ *
2163
+ * Storage is the renderer's own localStorage, which DSH backs with the
2164
+ * `persist:dsh-desktop-renderer` partition, so the value survives an app
2165
+ * restart. Every access is guarded: a locked-down or full store must not
2166
+ * break the theme, so an unreadable value simply falls back to the default.
2167
+ *
2168
+ * @returns one of BRAND_CLAUDE / BRAND_ANTHROPIC.
2169
+ */
2170
+ function readStoredBrand() {
2171
+ try {
2172
+ var raw = window.localStorage.getItem(BRAND_STORAGE_KEY)
2173
+ if (raw === BRAND_ANTHROPIC) return BRAND_ANTHROPIC
2174
+ if (raw === BRAND_CLAUDE) return BRAND_CLAUDE
2175
+ } catch (error) {
2176
+ /* storage unavailable — fall through to the default */
2177
+ }
2178
+ return DEFAULT_BRAND
2179
+ }
2180
+
2181
+ /** Persist the brand choice, ignoring a store that refuses writes. */
2182
+ function writeStoredBrand(brand) {
2183
+ try {
2184
+ window.localStorage.setItem(BRAND_STORAGE_KEY, brand)
2185
+ } catch (error) {
2186
+ /* storage unavailable — the session still shows the chosen brand */
2187
+ }
2188
+ }
2189
+
2190
+ /**
2191
+ * Apply a brand to the document. The stylesheet keys off the attribute, so
2192
+ * this is the single mutation that repaints the sidebar brand; keeping it to
2193
+ * one attribute write is what makes the switch cheap and idempotent.
2194
+ *
2195
+ * @param brand - the brand to show; unknown values fall back to the default.
2196
+ * @returns the brand actually applied.
2197
+ */
2198
+ function applyBrand(brand) {
2199
+ var next = brand === BRAND_ANTHROPIC ? BRAND_ANTHROPIC : BRAND_CLAUDE
2200
+ document.body.setAttribute(BRAND_ATTR, next)
2201
+ return next
2202
+ }
2203
+
2204
+ /**
2205
+ * The client context exposes no user or account service, so the account
2206
+ * name is inferred from the home-directory segment of a workspace path or
2207
+ * a session cwd. Falls back to 'User'.
2208
+ */
2209
+ function getUsername(ctx) {
2210
+ try {
2211
+ if (ctx && typeof ctx.get === 'function') {
2212
+ var workspaces = ctx.get('workspaces')
2213
+ if (workspaces && workspaces.list && typeof workspaces.list.getSnapshot === 'function') {
2214
+ var items = workspaces.list.getSnapshot().items || []
2215
+ for (var i = 0; i < items.length; i++) {
2216
+ var m = (items[i].path || '').match(/[/\\](?:Users|home)[/\\]([^/\\]+)/i)
2217
+ if (m && m[1]) return m[1]
2218
+ }
2219
+ }
2220
+ var sessions = ctx.get('sessions')
2221
+ if (sessions && sessions.list && typeof sessions.list.getSnapshot === 'function') {
2222
+ var byId = sessions.list.getSnapshot().byId || {}
2223
+ for (var id in byId) {
2224
+ var m2 = (byId[id].cwd || '').match(/[/\\](?:Users|home)[/\\]([^/\\]+)/i)
2225
+ if (m2 && m2[1]) return m2[1]
2226
+ }
2227
+ }
2228
+ }
2229
+ } catch (e) {}
2230
+ return 'User'
2231
+ }
2232
+
2233
+ // ============================================================================
2234
+ // Zone 4: Claude Code UI 重塑与交互增强 (UI Overrides)
2235
+ // ============================================================================
2236
+ /**
2237
+ * Install the Claude Code surface rewrites: the copy slots (hero headline,
2238
+ * composer hint), the permission segmented control, and the account footer.
2239
+ * All of them sit in React-rendered trees — the headline and hint re-render
2240
+ * on locale switches, the hint unmounts while a draft exists, and the
2241
+ * composer re-renders the access trigger on every preset change — so one
2242
+ * MutationObserver re-applies them after each render. Every rewrite is
2243
+ * idempotent (a node already in the target state is left alone, and the
2244
+ * controls are only inserted when absent), so the observer cannot feed
2245
+ * itself.
2246
+ */
2247
+ function installOverrides(ctx) {
2248
+ // --- 4.1 Copy Overrides ---
2249
+ /** Shipped idle composer hints (zh / en, hero / default) this skin replaces. */
2250
+ var HINT_SOURCES = [
2251
+ '描述你想要构建的内容',
2252
+ '发消息或创建任务',
2253
+ 'Describe what you want to build',
2254
+ 'Message or run a task',
2255
+ 'How can I help you today?',
2256
+ 'Type / for commands',
2257
+ ]
2258
+
2259
+ function rewriteHeadline() {
2260
+ var greeting = pickHeroGreeting(getUsername(ctx))
2261
+ var groups = document.querySelectorAll('[class*="titleGroup"]')
2262
+ for (var i = 0; i < groups.length; i++) {
2263
+ var spans = groups[i].children
2264
+ for (var j = 0; j < spans.length; j++) {
2265
+ var span = spans[j]
2266
+ var cls = span.getAttribute('class') || ''
2267
+ if (cls.indexOf('previewBadge') !== -1) continue
2268
+ if (span.textContent !== greeting) span.textContent = greeting
2269
+ break
2270
+ }
2271
+ }
2272
+ }
2273
+
2274
+ function rewriteHint() {
2275
+ var isHero = document.querySelector('[class*="heroWorkspaceRow"], [class*="titleGroup"]') !== null
2276
+ var targetHint = isHero ? COMPOSER_HINT : 'Type / for commands'
2277
+ var hints = document.querySelectorAll('[data-composer-placeholder]')
2278
+ for (var i = 0; i < hints.length; i++) {
2279
+ var node = hints[i]
2280
+ var text = node.textContent || ''
2281
+ var idle = false
2282
+ for (var j = 0; j < HINT_SOURCES.length; j++) {
2283
+ if (text.indexOf(HINT_SOURCES[j]) === 0) {
2284
+ idle = true
2285
+ break
2286
+ }
2287
+ }
2288
+ if (idle && text !== targetHint) node.textContent = targetHint
2289
+ }
2290
+ }
2291
+
2292
+ /**
2293
+ * Claude Code spinner verbs: picks one random verb per session turn
2294
+ * and retains it stably for that turn's thinking duration.
2295
+ */
2296
+ function pickRandomSpinnerVerb() {
2297
+ return SPINNER_VERBS[Math.floor(Math.random() * SPINNER_VERBS.length)] + '...'
2298
+ }
2299
+
2300
+ function rewriteTurnStatus() {
2301
+ var nodes = document.querySelectorAll('[role="status"][class*="turnStatus"], [class*="turnStatus"]:not([class*="Clock"]):not([class*="clock"])')
2302
+ for (var i = 0; i < nodes.length; i++) {
2303
+ var el = nodes[i]
2304
+ var cls = el.getAttribute('class') || ''
2305
+ if (cls.indexOf('Clock') !== -1 || cls.indexOf('clock') !== -1) continue
2306
+ var verb = el.getAttribute('data-dsh-spinner-verb')
2307
+ if (!verb) {
2308
+ verb = pickRandomSpinnerVerb()
2309
+ el.setAttribute('data-dsh-spinner-verb', verb)
2310
+ }
2311
+ for (var j = 0; j < el.childNodes.length; j++) {
2312
+ var child = el.childNodes[j]
2313
+ if (child.nodeType === Node.TEXT_NODE) {
2314
+ if (child.nodeValue !== verb) {
2315
+ child.nodeValue = verb
2316
+ }
2317
+ break
2318
+ }
2319
+ }
2320
+ }
2321
+ }
2322
+
2323
+ // --- 4.2 Permission Segments & In-Conversation Popover ---
2324
+ var segments = null
2325
+ var permContainer = null
2326
+ var permBtn = null
2327
+ var permLabel = null
2328
+ var permPopover = null
2329
+
2330
+ function buildSegments(onPick) {
2331
+ var group = document.createElement('div')
2332
+ group.className = SEGMENTS_CLASS
2333
+ group.setAttribute('role', 'radiogroup')
2334
+ group.setAttribute('aria-label', 'Permission')
2335
+ for (var i = 0; i < PERMISSION_SEGMENTS.length; i++) {
2336
+ var spec = PERMISSION_SEGMENTS[i]
2337
+ var item = document.createElement('button')
2338
+ item.type = 'button'
2339
+ item.className = SEGMENT_CLASS
2340
+ item.setAttribute('role', 'radio')
2341
+ item.setAttribute('data-preset', spec.preset)
2342
+ item.textContent = spec.label
2343
+ group.appendChild(item)
2344
+ }
2345
+ group.addEventListener('click', function (event) {
2346
+ var target = event.target
2347
+ var item = target !== null && typeof target.closest === 'function' ? target.closest('.' + SEGMENT_CLASS) : null
2348
+ if (item === null || !group.contains(item)) return
2349
+ onPick(item.getAttribute('data-preset'))
2350
+ })
2351
+ return group
2352
+ }
2353
+
2354
+ var permDocPointerListener = null
2355
+ var permResizeListener = null
2356
+
2357
+ /** Every dismiss route (item pick, outside pointer, resize/scroll, Escape) closes the menu through this one path. */
2358
+ function closePermMenu() {
2359
+ if (permBtn === null || permPopover === null) return
2360
+ permBtn.removeAttribute('data-open')
2361
+ permBtn.setAttribute('aria-expanded', 'false')
2362
+ permPopover.removeAttribute('data-open')
2363
+ }
2364
+
2365
+ function buildPermTriggerAndPopover(onPick) {
2366
+ var container = document.createElement('div')
2367
+ container.className = 'dsh-claude-perm-container'
2368
+
2369
+ var btn = document.createElement('button')
2370
+ btn.type = 'button'
2371
+ btn.className = 'dsh-claude-perm-btn'
2372
+ btn.setAttribute('aria-haspopup', 'menu')
2373
+ btn.setAttribute('aria-expanded', 'false')
2374
+
2375
+ var label = document.createElement('span')
2376
+ label.className = 'dsh-claude-perm-label'
2377
+ label.textContent = 'Accept edits'
2378
+
2379
+ var chevron = document.createElement('span')
2380
+ chevron.className = 'dsh-claude-perm-chevron'
2381
+ chevron.setAttribute('aria-hidden', 'true')
2382
+
2383
+ btn.appendChild(label)
2384
+ btn.appendChild(chevron)
2385
+
2386
+ var popover = document.createElement('div')
2387
+ popover.className = 'dsh-claude-perm-popover'
2388
+ popover.setAttribute('role', 'menu')
2389
+
2390
+ for (var i = 0; i < PERMISSION_OPTIONS.length; i++) {
2391
+ var opt = PERMISSION_OPTIONS[i]
2392
+ var item = document.createElement('button')
2393
+ item.type = 'button'
2394
+ item.className = 'dsh-claude-popover-item'
2395
+ item.setAttribute('role', 'menuitem')
2396
+ item.setAttribute('data-preset', opt.preset)
2397
+
2398
+ var col = document.createElement('div')
2399
+ col.style.cssText = 'display:flex; flex-direction:column; gap:2px; flex:1; text-align:left; min-width:0;'
2400
+
2401
+ var itemTitle = document.createElement('span')
2402
+ itemTitle.style.cssText = 'font-weight:500; font-size:13px; line-height:16px;'
2403
+ itemTitle.textContent = opt.label
2404
+
2405
+ var itemDesc = document.createElement('span')
2406
+ itemDesc.style.cssText = 'font-size:11px; line-height:14px; color:var(--dsw-alias-label-tertiary);'
2407
+ itemDesc.textContent = opt.desc
2408
+
2409
+ col.appendChild(itemTitle)
2410
+ col.appendChild(itemDesc)
2411
+ item.appendChild(col)
2412
+
2413
+ var check = document.createElement('span')
2414
+ check.className = 'dsh-claude-perm-check'
2415
+ check.style.cssText = 'font-size:12px; color:var(--dsw-alias-brand-primary, #d97757); margin-left:8px; display:none;'
2416
+ check.textContent = '✓'
2417
+ item.appendChild(check)
2418
+
2419
+ item.addEventListener('click', (function (preset) {
2420
+ return function (e) {
2421
+ e.stopPropagation()
2422
+ closePermMenu()
2423
+ onPick(preset)
2424
+ }
2425
+ })(opt.preset))
2426
+
2427
+ popover.appendChild(item)
2428
+ }
2429
+
2430
+ function openPerm() {
2431
+ var rect = btn.getBoundingClientRect()
2432
+ popover.style.left = Math.max(8, rect.left) + 'px'
2433
+ popover.style.bottom = Math.max(8, window.innerHeight - rect.top + 6) + 'px'
2434
+ btn.setAttribute('data-open', 'true')
2435
+ btn.setAttribute('aria-expanded', 'true')
2436
+ popover.setAttribute('data-open', 'true')
2437
+ }
2438
+
2439
+ btn.addEventListener('click', function (e) {
2440
+ e.stopPropagation()
2441
+ var isOpen = btn.getAttribute('data-open') === 'true'
2442
+ if (isOpen) {
2443
+ closePermMenu()
2444
+ } else {
2445
+ openPerm()
2446
+ }
2447
+ })
2448
+
2449
+ if (!permDocPointerListener) {
2450
+ permDocPointerListener = function (e) {
2451
+ if (permPopover && permBtn && permPopover.getAttribute('data-open') === 'true') {
2452
+ if (!permBtn.contains(e.target) && !permPopover.contains(e.target)) closePermMenu()
2453
+ }
2454
+ }
2455
+ document.addEventListener('pointerdown', permDocPointerListener)
2456
+ }
2457
+
2458
+ if (!permResizeListener) {
2459
+ permResizeListener = function () {
2460
+ if (permPopover && permBtn && permPopover.getAttribute('data-open') === 'true') closePermMenu()
2461
+ }
2462
+ window.addEventListener('resize', permResizeListener)
2463
+ window.addEventListener('scroll', permResizeListener, true)
2464
+ }
2465
+
2466
+ container.appendChild(btn)
2467
+ document.body.appendChild(popover)
2468
+
2469
+ return {
2470
+ container: container,
2471
+ btn: btn,
2472
+ label: label,
2473
+ popover: popover
2474
+ }
2475
+ }
2476
+
2477
+ function updatePermState(preset) {
2478
+ if (!permLabel || !permPopover) return
2479
+ var matchedLabel = 'Accept edits'
2480
+ for (var i = 0; i < PERMISSION_OPTIONS.length; i++) {
2481
+ if (PERMISSION_OPTIONS[i].preset === preset) {
2482
+ matchedLabel = PERMISSION_OPTIONS[i].label
2483
+ break
2484
+ }
2485
+ }
2486
+ permLabel.textContent = matchedLabel
2487
+
2488
+ var items = permPopover.querySelectorAll('[data-preset]')
2489
+ for (var j = 0; j < items.length; j++) {
2490
+ var it = items[j]
2491
+ var isCurrent = it.getAttribute('data-preset') === preset
2492
+ var check = it.querySelector('.dsh-claude-perm-check')
2493
+ if (check) {
2494
+ check.style.display = isCurrent ? 'inline' : 'none'
2495
+ }
2496
+ if (isCurrent) {
2497
+ it.setAttribute('data-active', '')
2498
+ } else {
2499
+ it.removeAttribute('data-active')
2500
+ }
2501
+ }
2502
+ }
2503
+
2504
+ function submitPreset(preset) {
2505
+ var session = currentSession(ctx)
2506
+ if (session === null) return
2507
+ var settled = session.command('/permission ' + preset)
2508
+ if (settled !== void 0 && typeof settled.then === 'function') settled.then(schedule, schedule)
2509
+ }
2510
+
2511
+ /**
2512
+ * Drive the shipped access menu to its full-access row, so the switch
2513
+ * runs through the shipped risk-confirmation dialog rather than a
2514
+ * skin-owned prompt. The trigger is hidden by this skin but still in
2515
+ * the tree, so a synthetic click still opens the menu; the row is then
2516
+ * picked by its label. A plain confirm stands in only when that menu
2517
+ * cannot be reached, which keeps the switch behind an explicit
2518
+ * acknowledgement either way.
2519
+ */
2520
+ function openShippedGate() {
2521
+ var trigger = findAccessTrigger()
2522
+ if (trigger === null) {
2523
+ if (window.confirm(GATED_PROMPT)) submitPreset(GATED_PRESET)
2524
+ return
2525
+ }
2526
+ trigger.click()
2527
+ var attempts = 0
2528
+ function seek() {
2529
+ var items = document.querySelectorAll('[role="menu"] button[role="menuitem"]')
2530
+ for (var i = 0; i < items.length; i++) {
2531
+ var text = (items[i].textContent || '').trim()
2532
+ for (var j = 0; j < FULL_ACCESS_LABELS.length; j++) {
2533
+ if (text === FULL_ACCESS_LABELS[j]) {
2534
+ items[i].click()
2535
+ return
2536
+ }
2537
+ }
2538
+ }
2539
+ attempts += 1
2540
+ if (attempts < 20) {
2541
+ requestAnimationFrame(seek)
2542
+ return
2543
+ }
2544
+ trigger.click()
2545
+ if (window.confirm(GATED_PROMPT)) submitPreset(GATED_PRESET)
2546
+ }
2547
+ requestAnimationFrame(seek)
2548
+ }
2549
+
2550
+ function pick(preset) {
2551
+ var session = currentSession(ctx)
2552
+ if (session === null || preset === null) return
2553
+ if (preset === currentPreset(session)) return
2554
+ if (preset === GATED_PRESET) {
2555
+ openShippedGate()
2556
+ return
2557
+ }
2558
+ submitPreset(preset)
2559
+ }
2560
+
2561
+ function syncAttachmentState() {
2562
+ var cards = document.querySelectorAll('[data-composer-card]')
2563
+ for (var ci = 0; ci < cards.length; ci++) {
2564
+ var card = cards[ci]
2565
+ var hasAtt = card.querySelector('._54WpYG_imageItem, [class*="imageItem"], [class*="thumbnail"], [class*="FileCard"], [class*="rail"]:not([class*="trailing"]) [class*="item"], [class*="rail"]:not([class*="trailing"]) img, [class*="rail"]:not([class*="trailing"]) [class*="card"]') !== null
2566
+ if (hasAtt) {
2567
+ if (card.getAttribute('data-has-attachments') !== 'true') {
2568
+ card.setAttribute('data-has-attachments', 'true')
2569
+ }
2570
+ } else {
2571
+ if (card.hasAttribute('data-has-attachments')) {
2572
+ card.removeAttribute('data-has-attachments')
2573
+ }
2574
+ }
2575
+ }
2576
+ }
2577
+
2578
+ function restoreStatsPosition() {
2579
+ var stats = document.querySelector('[data-composer-stats]')
2580
+ // `[class*="_row"]`, not `[class*="row"]`: the bare substring also
2581
+ // matches the input growth wrapper (`grow` contains `row`).
2582
+ if (stats && stats.parentElement && (stats.parentElement.matches && stats.parentElement.matches('[class*="_row"]') || stats.parentElement.querySelector('[class*="tools"]'))) {
2583
+ var card = stats.closest('[data-composer-card]')
2584
+ if (card && card.parentNode) {
2585
+ card.parentNode.insertBefore(stats, card.nextSibling)
2586
+ }
2587
+ }
2588
+ }
2589
+
2590
+ // Re-insert when a re-render swapped the host row, then mirror the running preset.
2591
+ function syncSegments() {
2592
+ var hasTurns = document.querySelector('[class*="turn"], [class*="message"], [data-turn], [data-message-id]') !== null
2593
+ var isHero = !hasTurns && (document.querySelector('[class*="composerHero"], [data-phase="hero"]') !== null)
2594
+ var allCards = document.querySelectorAll('[data-composer-card]')
2595
+ for (var c = 0; c < allCards.length; c++) {
2596
+ allCards[c].setAttribute('data-composer-variant', isHero ? 'hero' : 'inline')
2597
+ }
2598
+
2599
+ var trigger = findAccessTrigger()
2600
+ if (trigger === null) return
2601
+ var host = trigger.parentElement
2602
+ if (host === null) return
2603
+
2604
+ var session = currentSession(ctx)
2605
+ var preset = session === null ? null : currentPreset(session)
2606
+
2607
+ var existingPermContainers = document.querySelectorAll('.dsh-claude-perm-container')
2608
+ var existingSegments = document.querySelectorAll('.' + SEGMENTS_CLASS)
2609
+
2610
+ if (isHero) {
2611
+ for (var i = 0; i < existingPermContainers.length; i++) {
2612
+ existingPermContainers[i].remove()
2613
+ }
2614
+ if (permPopover && permPopover.parentElement) {
2615
+ permPopover.parentElement.removeChild(permPopover)
2616
+ }
2617
+ permContainer = null
2618
+ permBtn = null
2619
+ permLabel = null
2620
+ permPopover = null
2621
+
2622
+ if (existingSegments.length > 1) {
2623
+ for (var s = 1; s < existingSegments.length; s++) existingSegments[s].remove()
2624
+ }
2625
+ if (existingSegments.length === 1 && host.contains(existingSegments[0])) {
2626
+ segments = existingSegments[0]
2627
+ } else {
2628
+ for (var s2 = 0; s2 < existingSegments.length; s2++) existingSegments[s2].remove()
2629
+ segments = buildSegments(pick)
2630
+ host.insertBefore(segments, host.firstChild)
2631
+ }
2632
+ for (var j = 0; j < segments.children.length; j++) {
2633
+ var item = segments.children[j]
2634
+ if (item.getAttribute('data-preset') === preset) {
2635
+ item.setAttribute('data-active', '')
2636
+ item.setAttribute('aria-checked', 'true')
2637
+ } else {
2638
+ item.removeAttribute('data-active')
2639
+ item.setAttribute('aria-checked', 'false')
2640
+ }
2641
+ }
2642
+ } else {
2643
+ for (var es = 0; es < existingSegments.length; es++) {
2644
+ existingSegments[es].remove()
2645
+ }
2646
+ segments = null
2647
+
2648
+ var allExisting = document.querySelectorAll('.dsh-claude-perm-container')
2649
+ if (allExisting.length > 0) {
2650
+ permContainer = allExisting[0]
2651
+ for (var p = 1; p < allExisting.length; p++) {
2652
+ allExisting[p].remove()
2653
+ }
2654
+ if (permContainer.parentElement !== host) {
2655
+ host.insertBefore(permContainer, host.firstChild)
2656
+ }
2657
+ permBtn = permContainer.querySelector('.dsh-claude-perm-btn')
2658
+ permLabel = permContainer.querySelector('.dsh-claude-perm-label')
2659
+ } else {
2660
+ var res = buildPermTriggerAndPopover(pick)
2661
+ permContainer = res.container
2662
+ permBtn = res.btn
2663
+ permLabel = res.label
2664
+ permPopover = res.popover
2665
+ host.insertBefore(permContainer, host.firstChild)
2666
+ }
2667
+ updatePermState(preset)
2668
+ }
2669
+ }
2670
+
2671
+ // --- 4.3 Account Footer & Popover ---
2672
+ var accountBtn = null
2673
+ var accountPopover = null
2674
+ var popoverBody = null
2675
+ var popoverTimer = null
2676
+
2677
+ function openPopover() {
2678
+ if (!accountPopover || !accountBtn) return
2679
+ if (popoverTimer) {
2680
+ clearTimeout(popoverTimer)
2681
+ popoverTimer = null
2682
+ }
2683
+ accountPopover.setAttribute('data-open', 'true')
2684
+ accountBtn.setAttribute('data-open', 'true')
2685
+ accountBtn.setAttribute('aria-expanded', 'true')
2686
+ }
2687
+
2688
+ function closePopover() {
2689
+ if (!accountPopover || !accountBtn) return
2690
+ if (popoverTimer) {
2691
+ clearTimeout(popoverTimer)
2692
+ popoverTimer = null
2693
+ }
2694
+ accountPopover.setAttribute('data-open', 'false')
2695
+ accountBtn.setAttribute('data-open', 'false')
2696
+ accountBtn.setAttribute('aria-expanded', 'false')
2697
+ }
2698
+
2699
+ function togglePopover() {
2700
+ if (!accountPopover) return
2701
+ var isOpen = accountPopover.getAttribute('data-open') === 'true'
2702
+ if (isOpen) {
2703
+ closePopover()
2704
+ } else {
2705
+ openPopover()
2706
+ }
2707
+ }
2708
+
2709
+ function scheduleClosePopover() {
2710
+ if (popoverTimer) clearTimeout(popoverTimer)
2711
+ popoverTimer = setTimeout(function () {
2712
+ closePopover()
2713
+ }, 150)
2714
+ }
2715
+
2716
+ function cancelClosePopover() {
2717
+ if (popoverTimer) {
2718
+ clearTimeout(popoverTimer)
2719
+ popoverTimer = null
2720
+ }
2721
+ }
2722
+
2723
+ var settingsItem = null
2724
+ function syncPopoverItems(footArea) {
2725
+ if (!popoverBody || !footArea) return
2726
+
2727
+ var origSettingsTrigger = footArea.querySelector('[class*="settingsArea"] button[aria-haspopup="dialog"]') ||
2728
+ footArea.querySelector('[class*="settingsArea"] button')
2729
+ var labelText = '设置'
2730
+ if (origSettingsTrigger) {
2731
+ var txt = (origSettingsTrigger.textContent || '').trim()
2732
+ if (!txt) txt = origSettingsTrigger.getAttribute('aria-label') || ''
2733
+ if (txt) labelText = txt
2734
+ }
2735
+
2736
+ if (!settingsItem) {
2737
+ settingsItem = document.createElement('button')
2738
+ settingsItem.type = 'button'
2739
+ settingsItem.className = 'dsh-claude-popover-item'
2740
+ settingsItem.setAttribute('data-action', 'settings')
2741
+ settingsItem.innerHTML =
2742
+ '<span class="dsh-claude-popover-item-icon">' +
2743
+ '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">' +
2744
+ '<circle cx="12" cy="12" r="3"></circle>' +
2745
+ '<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>' +
2746
+ '</svg>' +
2747
+ '</span>' +
2748
+ '<span class="dsh-claude-popover-item-text">' + labelText + '</span>' +
2749
+ '<span class="dsh-claude-popover-item-shortcut">Ctrl+,</span>'
2750
+
2751
+ settingsItem.addEventListener('click', function (e) {
2752
+ e.stopPropagation()
2753
+ closePopover()
2754
+ var realTrigger = footArea.querySelector('[class*="settingsArea"] button[aria-haspopup="dialog"]') ||
2755
+ footArea.querySelector('[class*="settingsArea"] button')
2756
+ if (realTrigger) {
2757
+ realTrigger.click()
2758
+ }
2759
+ })
2760
+ popoverBody.appendChild(settingsItem)
2761
+ } else {
2762
+ var txtEl = settingsItem.querySelector('.dsh-claude-popover-item-text')
2763
+ if (txtEl && txtEl.textContent !== labelText) txtEl.textContent = labelText
2764
+ }
2765
+
2766
+ var footerActions = footArea.querySelector('[class*="footerActions"]')
2767
+ var footerEntries = syncFooterActionVisibility(footerActions)
2768
+
2769
+ var existingActionItems = popoverBody.querySelectorAll('[data-action-index], [data-embed-index]')
2770
+ for (var ea = 0; ea < existingActionItems.length; ea++) {
2771
+ var staleIdx = parseInt(existingActionItems[ea].getAttribute('data-action-index') || existingActionItems[ea].getAttribute('data-embed-index'), 10)
2772
+ if (isNaN(staleIdx) || staleIdx >= footerEntries.length) {
2773
+ existingActionItems[ea].parentElement.removeChild(existingActionItems[ea])
2774
+ }
2775
+ }
2776
+
2777
+ for (var f = 0; f < footerEntries.length; f++) {
2778
+ (function (entry, idx) {
2779
+ var trigger = findFooterTrigger(entry)
2780
+ var hasContent = (entry.textContent || '').trim() !== '' ||
2781
+ entry.querySelector('svg, img, canvas') !== null
2782
+
2783
+ // Rich widgets (progress bars, stat panels) cannot collapse into
2784
+ // a text menu item — embed a live clone instead, forwarding
2785
+ // clicks to the entry's trigger when it has one (the cost-meter
2786
+ // balance stack is itself clickable).
2787
+ if (!entryIsActionLike(entry, trigger)) {
2788
+ removeActionMirror(idx)
2789
+ if (hasContent) {
2790
+ syncEmbedMirror(entry, idx, trigger)
2791
+ } else {
2792
+ removeEmbedMirror(idx)
2793
+ }
2794
+ return
2795
+ }
2796
+ removeEmbedMirror(idx)
2797
+
2798
+ // The mirrored item activates the first interactive element
2799
+ // outside any overlay.
2800
+ var activator = trigger
2801
+ var item = popoverBody.querySelector('[data-action-index="' + idx + '"]')
2802
+ var iconEl = (trigger && trigger.querySelector('svg')) || entry.querySelector('svg')
2803
+ var iconHtml = iconEl ? iconEl.outerHTML : ''
2804
+ var text = activator.getAttribute('aria-label') || (activator.textContent || '').trim() || '插件'
2805
+ var badge = activator.getAttribute('data-cordis-badge') || entry.getAttribute('data-cordis-badge') || ''
2806
+
2807
+ if (!item) {
2808
+ item = document.createElement('button')
2809
+ item.type = 'button'
2810
+ item.className = 'dsh-claude-popover-item'
2811
+ item.setAttribute('data-action-index', idx)
2812
+ item.innerHTML =
2813
+ '<span class="dsh-claude-popover-item-icon">' + iconHtml + '</span>' +
2814
+ '<span class="dsh-claude-popover-item-text">' + text + '</span>' +
2815
+ (badge ? '<span class="dsh-claude-popover-item-badge">' + badge + '</span>' : '')
2816
+
2817
+ item.addEventListener('click', function (e) {
2818
+ e.stopPropagation()
2819
+ closePopover()
2820
+ // The activator is rebound on every sync pass
2821
+ // (`item.__dshActivator`), never captured at creation — the
2822
+ // host re-sorts list slots by `order` on each render, so the
2823
+ // entry behind an index changes over time.
2824
+ var live = item.__dshActivator
2825
+ if (live && typeof live.click === 'function') live.click()
2826
+ })
2827
+ popoverBody.insertBefore(item, settingsItem)
2828
+ } else {
2829
+ // Entries are reused by index: the host re-sorts list slots by
2830
+ // `order` on every render, so a re-sort can seat a different
2831
+ // plugin under an existing item — icon, text, badge AND the
2832
+ // click target must all re-sync, or the label shows one entry
2833
+ // while the click fires the previous occupant's trigger.
2834
+ var iEl = item.querySelector('.dsh-claude-popover-item-icon')
2835
+ if (iEl && iEl.innerHTML !== iconHtml) iEl.innerHTML = iconHtml
2836
+ var tEl = item.querySelector('.dsh-claude-popover-item-text')
2837
+ if (tEl && tEl.textContent !== text) tEl.textContent = text
2838
+ var bEl = item.querySelector('.dsh-claude-popover-item-badge')
2839
+ if (bEl && bEl.textContent !== badge) bEl.textContent = badge
2840
+ }
2841
+ // Rebind the click target to the entry currently behind this
2842
+ // index. Done on every pass, for new and reused items alike.
2843
+ item.__dshActivator = activator
2844
+ })(footerEntries[f], f)
2845
+ }
2846
+
2847
+ // The host re-sorts list-slot outlets by `order` on every render
2848
+ // (stable, ties keep registration order), and plugins mount
2849
+ // progressively at startup — so the mirror nodes must track the live
2850
+ // footer order on every pass: a later re-sort would otherwise leave
2851
+ // the popover frozen in a stale order that no longer matches the
2852
+ // real controls. Re-append action items and embedded widgets in
2853
+ // entry-index order.
2854
+ var mirrors = []
2855
+ for (var mi = 0; mi < popoverBody.children.length; mi++) {
2856
+ var mirrorNode = popoverBody.children[mi]
2857
+ if (mirrorNode === settingsItem) continue
2858
+ if (mirrorNode.hasAttribute('data-action-index') || mirrorNode.hasAttribute('data-embed-index')) {
2859
+ mirrors.push(mirrorNode)
2860
+ }
2861
+ }
2862
+ mirrors.sort(function (a, b) {
2863
+ var ai = parseInt(a.getAttribute('data-action-index') || a.getAttribute('data-embed-index'), 10) || 0
2864
+ var bi = parseInt(b.getAttribute('data-action-index') || b.getAttribute('data-embed-index'), 10) || 0
2865
+ return ai - bi
2866
+ })
2867
+ for (var mr = 0; mr < mirrors.length; mr++) {
2868
+ popoverBody.insertBefore(mirrors[mr], settingsItem)
2869
+ }
2870
+ }
2871
+
2872
+ // --- Footer action redirection helpers ---
2873
+ /**
2874
+ * The `sidebar.footer.action` list slot accepts arbitrary plugin
2875
+ * controls, not just buttons: a plugin may render a composite widget
2876
+ * (toggles, selects, status chips) straight into the sidebar footer.
2877
+ * Redirection therefore works on ENTRIES (direct children of
2878
+ * footerActions), not on `querySelectorAll('button')`:
2879
+ * - every entry is marked `data-dsh-claude-footer-entry` (CSS
2880
+ * collapses its box so nothing paints in the sidebar);
2881
+ * - entries without a floating overlay are hidden wholesale via
2882
+ * `data-dsh-claude-footer-hidden`;
2883
+ * - entries hosting an overlay — a fixed-position panel (the cordis
2884
+ * inventory panel) or a dialog/menu/listbox — stay visible, but
2885
+ * every branch of their subtree that does not lead to the overlay
2886
+ * is hidden, so only the overlay itself can surface.
2887
+ * Returns the live entry list for popover mirroring.
2888
+ */
2889
+ function syncFooterActionVisibility(footerActions) {
2890
+ if (!footerActions) return []
2891
+ var entries = footerEntriesOf(footerActions)
2892
+ for (var i = 0; i < entries.length; i++) {
2893
+ var entry = entries[i]
2894
+ entry.setAttribute('data-dsh-claude-footer-entry', '')
2895
+ var all = entry.querySelectorAll('*')
2896
+ for (var j = 0; j < all.length; j++) {
2897
+ var el = all[j]
2898
+ if (el.hasAttribute('data-dsh-claude-footer-overlay')) continue
2899
+ var role = el.getAttribute('role') || ''
2900
+ var overlay = role === 'dialog' || role === 'menu' || role === 'listbox'
2901
+ if (!overlay) {
2902
+ try { overlay = window.getComputedStyle(el).position === 'fixed' } catch (e) { overlay = false }
2903
+ }
2904
+ if (overlay) el.setAttribute('data-dsh-claude-footer-overlay', '')
2905
+ }
2906
+ markFooterHiddenBranches(entry)
2907
+ }
2908
+ return entries
2909
+ }
2910
+
2911
+ /**
2912
+ * Mirrorable footer units. Every slot outlet renders inside a
2913
+ * `div[data-slot]` anchor with `display:contents`, so a list slot's
2914
+ * entries are the ANCHOR's children, not footerActions' — reading
2915
+ * `footerActions.children` directly collapses every registrant into a
2916
+ * single mirrorable unit and drops all but the first from the popover.
2917
+ * Dead cells (`data-slot-error`) never mirror.
2918
+ */
2919
+ function footerEntriesOf(footerActions) {
2920
+ var entries = []
2921
+ var kids = footerActions.children
2922
+ for (var i = 0; i < kids.length; i++) {
2923
+ var kid = kids[i]
2924
+ if (kid.hasAttribute('data-slot-error')) continue
2925
+ if (kid.hasAttribute('data-slot')) {
2926
+ var slotKids = kid.children
2927
+ for (var j = 0; j < slotKids.length; j++) {
2928
+ if (!slotKids[j].hasAttribute('data-slot-error')) entries.push(slotKids[j])
2929
+ }
2930
+ } else {
2931
+ entries.push(kid)
2932
+ }
2933
+ }
2934
+ return entries
2935
+ }
2936
+
2937
+ /** Hide every branch of `el`'s subtree that does not carry an overlay. */
2938
+ function markFooterHiddenBranches(el) {
2939
+ if (el.hasAttribute('data-dsh-claude-footer-overlay')) {
2940
+ el.removeAttribute('data-dsh-claude-footer-hidden')
2941
+ return
2942
+ }
2943
+ if (el.querySelector('[data-dsh-claude-footer-overlay]') !== null) {
2944
+ el.removeAttribute('data-dsh-claude-footer-hidden')
2945
+ var kids = el.children
2946
+ for (var i = 0; i < kids.length; i++) markFooterHiddenBranches(kids[i])
2947
+ return
2948
+ }
2949
+ el.setAttribute('data-dsh-claude-footer-hidden', '')
2950
+ }
2951
+
2952
+ /** Remove the mirrored text item for one entry index, if present. */
2953
+ function removeActionMirror(idx) {
2954
+ var item = popoverBody.querySelector('[data-action-index="' + idx + '"]')
2955
+ if (item && item.parentElement) item.parentElement.removeChild(item)
2956
+ }
2957
+
2958
+ /** Remove the embedded widget clone for one entry index, if present. */
2959
+ function removeEmbedMirror(idx) {
2960
+ var embed = popoverBody.querySelector('[data-embed-index="' + idx + '"]')
2961
+ if (embed && embed.parentElement) embed.parentElement.removeChild(embed)
2962
+ }
2963
+
2964
+ /**
2965
+ * Whether an entry reads as a plain ACTION (mirror it as a text menu
2966
+ * item) or as a rich WIDGET (embed a live clone). A text item is only
2967
+ * faithful when the trigger accounts for essentially all of the
2968
+ * entry's visible content: a clickable progress-bar stack (cost-meter
2969
+ * balance) would otherwise shrink to one label and lose its bars.
2970
+ * Overlay text is excluded so an open cordis panel does not flip its
2971
+ * own entry into a widget.
2972
+ */
2973
+ function entryIsActionLike(entry, trigger) {
2974
+ if (trigger === null) return false
2975
+ if (trigger === entry) {
2976
+ // Only genuinely interactive ROOTS count as actions; a clickable
2977
+ // container (a region or tabindex wrapper) is still a widget.
2978
+ var tag = entry.tagName
2979
+ var role = entry.getAttribute('role') || ''
2980
+ return tag === 'BUTTON' || tag === 'A' || role === 'button'
2981
+ }
2982
+ // Semantic meter markup is always a widget, however small.
2983
+ if (entry.querySelector('[role="progressbar"], [role="meter"], meter, progress') !== null) return false
2984
+ var entryText = textExcludingOverlays(entry)
2985
+ var triggerText = (trigger.textContent || '').trim()
2986
+ // Tight slack: the trigger must account for essentially all of the
2987
+ // entry's visible text. A balance box reading "余额¥10.07" beside an
2988
+ // icon-only trigger already exceeds it — and its bar must survive.
2989
+ return entryText.length - triggerText.length <= 2
2990
+ }
2991
+
2992
+ /** Visible text of an entry, skipping overlay subtrees. */
2993
+ function textExcludingOverlays(entry) {
2994
+ var text = ''
2995
+ var walker = document.createTreeWalker(entry, 4 /* SHOW_TEXT */, {
2996
+ acceptNode: function (node) {
2997
+ var p = node.parentElement
2998
+ while (p && p !== entry) {
2999
+ if (p.hasAttribute('data-dsh-claude-footer-overlay')) return 2 // REJECT
3000
+ p = p.parentElement
3001
+ }
3002
+ return 1 // ACCEPT
3003
+ }
3004
+ })
3005
+ while (walker.nextNode()) text += walker.currentNode.nodeValue
3006
+ return text.trim()
3007
+ }
3008
+
3009
+ /**
3010
+ * Embed a live clone of a display-only footer entry (a progress bar
3011
+ * reads as nothing as a text menu item — the cost-meter balance/quota
3012
+ * stack is the known case). The clone is replaced only when the
3013
+ * source's markup changes, so it tracks the plugin's re-renders without
3014
+ * churning the popover DOM. Skin marker attributes, ids, and overlay
3015
+ * subtrees are stripped from the copy: it must never be re-hidden by
3016
+ * the footArea hiding rule, double-register an id, or duplicate an
3017
+ * open panel next to the real one. Event listeners do not survive
3018
+ * cloning, so the embed forwards clicks back into the live entry —
3019
+ * path-mapped to the clicked sub-control (see resolveEmbedActivator) —
3020
+ * and deliberately leaves the popover open so the widget's response
3021
+ * stays visible; it still closes on pointer-leave as usual. The embed
3022
+ * is marked `data-clickable` for the cursor when the entry has a
3023
+ * trigger at all.
3024
+ */
3025
+ function syncEmbedMirror(entry, idx, forward) {
3026
+ var embed = popoverBody.querySelector('[data-embed-index="' + idx + '"]')
3027
+ if (!embed) {
3028
+ embed = document.createElement('div')
3029
+ embed.className = 'dsh-claude-popover-embed'
3030
+ embed.setAttribute('data-embed-index', idx)
3031
+ embed.addEventListener('click', function (e) {
3032
+ if (!embed.__dshEntry) return
3033
+ e.stopPropagation()
3034
+ var activator = resolveEmbedActivator(e.target, embed)
3035
+ if (activator) activator.click()
3036
+ })
3037
+ popoverBody.insertBefore(embed, settingsItem)
3038
+ }
3039
+ embed.__dshEntry = entry
3040
+ embed.__dshForward = forward || null
3041
+ if (forward) {
3042
+ embed.setAttribute('data-clickable', '')
3043
+ } else {
3044
+ embed.removeAttribute('data-clickable')
3045
+ }
3046
+ var clone = entry.cloneNode(true)
3047
+ clone.removeAttribute('id')
3048
+ clone.removeAttribute('data-dsh-claude-footer-entry')
3049
+ clone.removeAttribute('data-dsh-claude-footer-hidden')
3050
+ clone.removeAttribute('data-dsh-claude-footer-overlay')
3051
+ var overlays = clone.querySelectorAll('[data-dsh-claude-footer-overlay]')
3052
+ for (var o = 0; o < overlays.length; o++) {
3053
+ overlays[o].parentElement.removeChild(overlays[o])
3054
+ }
3055
+ var stripped = clone.querySelectorAll('[id], [data-dsh-claude-footer-hidden]')
3056
+ for (var s = 0; s < stripped.length; s++) {
3057
+ stripped[s].removeAttribute('id')
3058
+ stripped[s].removeAttribute('data-dsh-claude-footer-hidden')
3059
+ }
3060
+ var html = clone.outerHTML
3061
+ if (embed.getAttribute('data-embed-html') !== html) {
3062
+ embed.setAttribute('data-embed-html', html)
3063
+ while (embed.firstChild) embed.removeChild(embed.firstChild)
3064
+ embed.appendChild(clone)
3065
+ }
3066
+ }
3067
+
3068
+ var INTERACTIVE_SELECTOR = 'button, [role="button"], a[href], [tabindex], input, select, summary'
3069
+
3070
+ /**
3071
+ * Map a click inside the embedded clone back to the matching control
3072
+ * of the live entry. Forwarding every embed click to the entry's FIRST
3073
+ * trigger misfires for multi-control widgets (the cost-meter stack
3074
+ * carries refresh / collapse / tab buttons): the user clicks the
3075
+ * balance box but the first button in tree order fires. The clone
3076
+ * preserves the entry's tree shape, so the clicked node's child-index
3077
+ * path replays onto the original (tag-checked per level — overlay
3078
+ * stripping can shift siblings); the nearest interactive element at or
3079
+ * above the mapped node wins, and any mismatch falls back to the
3080
+ * entry's primary trigger.
3081
+ */
3082
+ function resolveEmbedActivator(clicked, embed) {
3083
+ var entry = embed.__dshEntry
3084
+ var cloneRoot = embed.firstChild
3085
+ if (!entry || !cloneRoot || !clicked || clicked.nodeType !== 1) return embed.__dshForward
3086
+ if (clicked === embed || clicked === cloneRoot) return embed.__dshForward
3087
+ // Child-index path from the clicked clone node up to the clone root.
3088
+ var path = []
3089
+ var node = clicked
3090
+ while (node && node !== cloneRoot) {
3091
+ var parent = node.parentElement
3092
+ if (!parent) return embed.__dshForward
3093
+ path.unshift(Array.prototype.indexOf.call(parent.children, node))
3094
+ node = parent
3095
+ }
3096
+ // Replay the path on the live entry, verifying shape level by level.
3097
+ var original = entry
3098
+ var cloneNode = cloneRoot
3099
+ for (var i = 0; i < path.length; i++) {
3100
+ var nextClone = cloneNode.children[path[i]]
3101
+ var nextOrig = original.children[path[i]]
3102
+ if (!nextClone || !nextOrig || nextClone.tagName !== nextOrig.tagName) {
3103
+ return embed.__dshForward
3104
+ }
3105
+ cloneNode = nextClone
3106
+ original = nextOrig
3107
+ }
3108
+ // Nearest interactive element at or above the mapped original,
3109
+ // bounded by the entry and never inside an overlay subtree.
3110
+ var target = original
3111
+ while (target) {
3112
+ if (target !== entry && target.matches && target.matches(INTERACTIVE_SELECTOR) &&
3113
+ !hasOverlayAncestor(target, entry)) {
3114
+ return target
3115
+ }
3116
+ if (target === entry) break
3117
+ target = target.parentElement
3118
+ }
3119
+ return embed.__dshForward
3120
+ }
3121
+
3122
+ /** Whether `el` sits inside an overlay-marked subtree above `entry`. */
3123
+ function hasOverlayAncestor(el, entry) {
3124
+ var node = el
3125
+ while (node && node !== entry) {
3126
+ if (node.hasAttribute && node.hasAttribute('data-dsh-claude-footer-overlay')) return true
3127
+ node = node.parentElement
3128
+ }
3129
+ return false
3130
+ }
3131
+
3132
+ /**
3133
+ * First interactive element of a footer entry that is not part of an
3134
+ * overlay subtree (an open panel may render action buttons of its own,
3135
+ * and those must never become the popover item's activation target).
3136
+ */
3137
+ function findFooterTrigger(entry) {
3138
+ var selector = INTERACTIVE_SELECTOR
3139
+ if (entry.matches && entry.matches(selector) &&
3140
+ !entry.hasAttribute('data-dsh-claude-footer-overlay')) {
3141
+ return entry
3142
+ }
3143
+ var found = entry.querySelectorAll(selector)
3144
+ for (var i = 0; i < found.length; i++) {
3145
+ var candidate = found[i]
3146
+ var node = candidate
3147
+ var insideOverlay = false
3148
+ while (node && node !== entry) {
3149
+ if (node.hasAttribute && node.hasAttribute('data-dsh-claude-footer-overlay')) {
3150
+ insideOverlay = true
3151
+ break
3152
+ }
3153
+ node = node.parentElement
3154
+ }
3155
+ if (!insideOverlay) return candidate
3156
+ }
3157
+ return null
3158
+ }
3159
+
3160
+ function syncAccountFooter() {
3161
+ var footArea = document.querySelector('[class*="footArea"]')
3162
+ if (footArea === null) return
3163
+
3164
+ var username = getUsername(ctx)
3165
+
3166
+ if (accountBtn === null || !footArea.contains(accountBtn)) {
3167
+ if (accountBtn && accountBtn.parentElement) accountBtn.parentElement.removeChild(accountBtn)
3168
+ accountBtn = document.createElement('div')
3169
+ accountBtn.className = 'dsh-claude-account-btn'
3170
+ accountBtn.setAttribute('role', 'button')
3171
+ accountBtn.setAttribute('tabindex', '0')
3172
+ accountBtn.setAttribute('aria-haspopup', 'menu')
3173
+ accountBtn.setAttribute('aria-expanded', 'false')
3174
+ accountBtn.innerHTML =
3175
+ '<span class="dsh-claude-account-avatar"></span>' +
3176
+ '<span class="dsh-claude-account-label">' +
3177
+ '<span class="dsh-claude-account-user">' + username + '</span>' +
3178
+ '</span>' +
3179
+ '<span class="dsh-claude-account-chevron"></span>'
3180
+
3181
+ accountBtn.addEventListener('mouseenter', function () {
3182
+ openPopover()
3183
+ })
3184
+ accountBtn.addEventListener('mouseleave', function () {
3185
+ scheduleClosePopover()
3186
+ })
3187
+ accountBtn.addEventListener('click', function (e) {
3188
+ e.stopPropagation()
3189
+ togglePopover()
3190
+ })
3191
+ footArea.appendChild(accountBtn)
3192
+ } else {
3193
+ var userEl = accountBtn.querySelector('.dsh-claude-account-user')
3194
+ if (userEl && userEl.textContent !== username) userEl.textContent = username
3195
+ }
3196
+
3197
+ if (accountPopover === null || !footArea.contains(accountPopover)) {
3198
+ if (accountPopover && accountPopover.parentElement) accountPopover.parentElement.removeChild(accountPopover)
3199
+ accountPopover = document.createElement('div')
3200
+ accountPopover.id = 'dsh-claude-account-popover'
3201
+ accountPopover.className = 'dsh-claude-account-popover'
3202
+ accountPopover.setAttribute('data-open', 'false')
3203
+
3204
+ accountPopover.addEventListener('mouseenter', function () {
3205
+ cancelClosePopover()
3206
+ })
3207
+ accountPopover.addEventListener('mouseleave', function () {
3208
+ scheduleClosePopover()
3209
+ })
3210
+
3211
+ var header = document.createElement('div')
3212
+ header.className = 'dsh-claude-account-popover-header'
3213
+
3214
+ var nameEl = document.createElement('div')
3215
+ nameEl.className = 'dsh-claude-account-popover-name'
3216
+ nameEl.textContent = username
3217
+
3218
+ var divider = document.createElement('div')
3219
+ divider.className = 'dsh-claude-account-popover-divider'
3220
+
3221
+ header.appendChild(nameEl)
3222
+ header.appendChild(divider)
3223
+ accountPopover.appendChild(header)
3224
+
3225
+ popoverBody = document.createElement('div')
3226
+ popoverBody.className = 'dsh-claude-account-popover-body'
3227
+ accountPopover.appendChild(popoverBody)
3228
+
3229
+ footArea.appendChild(accountPopover)
3230
+ } else {
3231
+ var nameEl2 = accountPopover.querySelector('.dsh-claude-account-popover-name')
3232
+ if (nameEl2 && nameEl2.textContent !== username) nameEl2.textContent = username
3233
+ }
3234
+
3235
+ syncPopoverItems(footArea)
3236
+ }
3237
+
3238
+ // ============================================================================
3239
+ // Zone 5: 响应式调度与生命周期清理 (Scheduler & Teardown)
3240
+ // ============================================================================
3241
+ function onGlobalPointerDown(e) {
3242
+ if (!accountPopover || !accountBtn) return
3243
+ var target = e.target
3244
+ if (target && (accountBtn.contains(target) || accountPopover.contains(target))) return
3245
+ closePopover()
3246
+ }
3247
+
3248
+ function onGlobalKeyDown(e) {
3249
+ if (e.key === 'Escape') {
3250
+ closePopover()
3251
+ closePermMenu()
3252
+ }
3253
+ if ((e.ctrlKey || e.metaKey) && e.key === ',') {
3254
+ e.preventDefault()
3255
+ var realTrigger = document.querySelector('[class*="footArea"] [class*="settingsArea"] button[aria-haspopup="dialog"]') ||
3256
+ document.querySelector('[class*="footArea"] [class*="settingsArea"] button')
3257
+ if (realTrigger) {
3258
+ realTrigger.click()
3259
+ }
3260
+ }
3261
+ // Plain Enter in inline composer sends message; Shift+Enter creates newline; IME composition preserved
3262
+ if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey && !e.metaKey && !e.altKey) {
3263
+ if (e.isComposing || e.keyCode === 229) return
3264
+ var target = e.target
3265
+ if (target && (target.hasAttribute('data-composer-input') || (target.closest && target.closest('[data-composer-input]')))) {
3266
+ var card = target.closest('[data-composer-card]')
3267
+ if (card) {
3268
+ var sendBtn = card.querySelector('button[aria-label^="发送"], button[aria-label^="Send"], button[aria-label*="发送"], button[aria-label*="Send"], button[aria-label*="排队"], button[aria-label*="Queue"], button[aria-label*="插话"], button[aria-label*="Steer"], [class*="sendBtn"], [class*="sendButton"]')
3269
+ if (sendBtn && !sendBtn.disabled) {
3270
+ e.preventDefault()
3271
+ e.stopPropagation()
3272
+ sendBtn.click()
3273
+ }
3274
+ }
3275
+ }
3276
+ }
3277
+ }
3278
+
3279
+ function onCardPointerDown(e) {
3280
+ var card = e.target.closest && e.target.closest('[data-composer-card][data-composer-variant="inline"]')
3281
+ if (!card) return
3282
+ if (e.target.closest('button, [role="button"], [role="menu"], [role="radiogroup"], input, select')) return
3283
+ var input = card.querySelector('[data-composer-input]')
3284
+ if (input && document.activeElement !== input) {
3285
+ input.focus()
3286
+ }
3287
+ }
3288
+
3289
+ document.addEventListener('pointerdown', onGlobalPointerDown)
3290
+ document.addEventListener('pointerdown', onCardPointerDown)
3291
+ document.addEventListener('keydown', onGlobalKeyDown, true)
3292
+
3293
+ // Chat streaming mutates the tree constantly; coalesce to one pass a frame.
3294
+ var scheduled = false
3295
+ var composerCardObserver = null
3296
+ var observedCard = null
3297
+ if (typeof ResizeObserver !== 'undefined') {
3298
+ composerCardObserver = new ResizeObserver(function () {
3299
+ var scroller = document.querySelector('[data-conversation-scroll], [class*="scrollBody"]')
3300
+ if (scroller) {
3301
+ var dist = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight
3302
+ if (dist < 150) {
3303
+ scroller.scrollTop = scroller.scrollHeight
3304
+ }
3305
+ }
3306
+ })
3307
+ }
3308
+
3309
+ function schedule() {
3310
+ if (scheduled) return
3311
+ scheduled = true
3312
+ requestAnimationFrame(function () {
3313
+ scheduled = false
3314
+ rewriteHeadline()
3315
+ rewriteHint()
3316
+ rewriteTurnStatus()
3317
+ syncAttachmentState()
3318
+ restoreStatsPosition()
3319
+ syncSegments()
3320
+ syncAccountFooter()
3321
+ if (composerCardObserver) {
3322
+ var currentCard = document.querySelector('[data-composer-card]')
3323
+ if (currentCard !== observedCard) {
3324
+ if (observedCard) composerCardObserver.unobserve(observedCard)
3325
+ observedCard = currentCard
3326
+ if (observedCard) composerCardObserver.observe(observedCard)
3327
+ }
3328
+ }
3329
+ })
3330
+ }
3331
+
3332
+ var observer = new MutationObserver(schedule)
3333
+ observer.observe(document.body, {
3334
+ childList: true,
3335
+ characterData: true,
3336
+ subtree: true,
3337
+ attributes: true,
3338
+ // The shipped trigger carries the current preset in its aria-label.
3339
+ attributeFilter: ['aria-label'],
3340
+ })
3341
+ schedule()
3342
+
3343
+ // The hero greeting follows the clock: re-apply it every minute so the
3344
+ // line rolls over on the hour while the app stays open. rewriteHeadline
3345
+ // skips identical text, so this cannot feed the observer.
3346
+ var greetingTimer = setInterval(function () {
3347
+ rewriteHeadline()
3348
+ }, 60000)
3349
+
3350
+ return function () {
3351
+ clearInterval(greetingTimer)
3352
+ greetingTimer = null
3353
+ observer.disconnect()
3354
+ if (composerCardObserver) {
3355
+ composerCardObserver.disconnect()
3356
+ composerCardObserver = null
3357
+ observedCard = null
3358
+ }
3359
+ if (popoverTimer) {
3360
+ clearTimeout(popoverTimer)
3361
+ popoverTimer = null
3362
+ }
3363
+ document.removeEventListener('pointerdown', onGlobalPointerDown)
3364
+ document.removeEventListener('pointerdown', onCardPointerDown)
3365
+ document.removeEventListener('keydown', onGlobalKeyDown, true)
3366
+ if (permDocPointerListener) {
3367
+ document.removeEventListener('pointerdown', permDocPointerListener)
3368
+ permDocPointerListener = null
3369
+ }
3370
+ if (permResizeListener) {
3371
+ window.removeEventListener('resize', permResizeListener)
3372
+ window.removeEventListener('scroll', permResizeListener, true)
3373
+ permResizeListener = null
3374
+ }
3375
+ if (segments !== null && segments.parentElement !== null) segments.parentElement.removeChild(segments)
3376
+ segments = null
3377
+ if (permPopover !== null && permPopover.parentElement !== null) {
3378
+ permPopover.parentElement.removeChild(permPopover)
3379
+ }
3380
+ permPopover = null
3381
+ permBtn = null
3382
+ permLabel = null
3383
+ permContainer = null
3384
+ if (accountPopover !== null && accountPopover.parentElement !== null) {
3385
+ accountPopover.parentElement.removeChild(accountPopover)
3386
+ }
3387
+ accountPopover = null
3388
+ popoverBody = null
3389
+ if (accountBtn !== null && accountBtn.parentElement !== null) {
3390
+ accountBtn.parentElement.removeChild(accountBtn)
3391
+ }
3392
+ accountBtn = null
3393
+ var leftoverItems = document.querySelectorAll('.dsh-claude-popover-item, .dsh-claude-popover-embed, .dsh-claude-account-popover, .dsh-claude-account-btn, .dsh-claude-perm-container, .dsh-claude-perm-popover, .dsh-claude-segments')
3394
+ for (var li = 0; li < leftoverItems.length; li++) {
3395
+ if (leftoverItems[li].parentElement) {
3396
+ leftoverItems[li].parentElement.removeChild(leftoverItems[li])
3397
+ }
3398
+ }
3399
+ // Un-hide host footer controls the popover redirection had hidden.
3400
+ var footerMarked = document.querySelectorAll('[data-dsh-claude-footer-entry], [data-dsh-claude-footer-hidden], [data-dsh-claude-footer-overlay]')
3401
+ for (var fm = 0; fm < footerMarked.length; fm++) {
3402
+ footerMarked[fm].removeAttribute('data-dsh-claude-footer-entry')
3403
+ footerMarked[fm].removeAttribute('data-dsh-claude-footer-hidden')
3404
+ footerMarked[fm].removeAttribute('data-dsh-claude-footer-overlay')
3405
+ }
3406
+ }
3407
+ }
3408
+
3409
+ // ============================================================================
3410
+ // Zone 4.4: 设置页品牌分区 (Settings Section: Brand)
3411
+ // ============================================================================
3412
+ /**
3413
+ * The settings page section, mounted by the host into the `settings.section`
3414
+ * slot. That slot hands a section only `{ close }` plus the standard hooks, so
3415
+ * this component owns its state and persistence rather than reading a store.
3416
+ *
3417
+ * It renders a segmented control in the same visual language as the composer's
3418
+ * permission control: a single hairline track with the active segment plated.
3419
+ */
3420
+ function BrandSettingsSection() {
3421
+ var state = React.useState(readStoredBrand())
3422
+ var brand = state[0]
3423
+ var setBrand = state[1]
3424
+
3425
+ var choose = function (next) {
3426
+ if (next === brand) return
3427
+ writeStoredBrand(next)
3428
+ applyBrand(next)
3429
+ setBrand(next)
3430
+ }
3431
+
3432
+ var options = [
3433
+ { value: BRAND_CLAUDE, label: 'Claude' },
3434
+ { value: BRAND_ANTHROPIC, label: 'Anthropic' },
3435
+ ]
3436
+
3437
+ var segments = []
3438
+ for (var i = 0; i < options.length; i++) {
3439
+ segments.push(
3440
+ React.createElement(
3441
+ 'button',
3442
+ {
3443
+ key: options[i].value,
3444
+ type: 'button',
3445
+ className: 'dsh-claude-brand-option',
3446
+ 'data-active': options[i].value === brand ? 'true' : 'false',
3447
+ 'aria-pressed': options[i].value === brand ? 'true' : 'false',
3448
+ onClick: (function (value) {
3449
+ return function () {
3450
+ choose(value)
3451
+ }
3452
+ })(options[i].value),
3453
+ },
3454
+ options[i].label,
3455
+ ),
3456
+ )
3457
+ }
3458
+
3459
+ return React.createElement(
3460
+ 'div',
3461
+ { className: 'dsh-claude-brand-section' },
3462
+ React.createElement('div', { className: 'dsh-claude-brand-title' }, 'Claude Style'),
3463
+ React.createElement(
3464
+ 'div',
3465
+ { className: 'dsh-claude-brand-card' },
3466
+ React.createElement(
3467
+ 'div',
3468
+ { className: 'dsh-claude-brand-card-text' },
3469
+ React.createElement('div', { className: 'dsh-claude-brand-card-title' }, 'Sidebar brand'),
3470
+ React.createElement(
3471
+ 'div',
3472
+ { className: 'dsh-claude-brand-card-desc' },
3473
+ 'Which brand mark the sidebar shows. Claude is the default.',
3474
+ ),
3475
+ ),
3476
+ React.createElement('div', { className: 'dsh-claude-brand-segments', role: 'group' }, segments),
3477
+ ),
3478
+ )
3479
+ }
3480
+
3481
+ /**
3482
+ * Register the settings section.
3483
+ *
3484
+ * Two waits are needed, and both are declarative rather than polling:
3485
+ *
3486
+ * 1. `ctx.inject(['slots'], …)` waits for the slot registry service. The
3487
+ * renderer provides it, so reading `ctx.get('slots')` directly during
3488
+ * `apply` could see nothing and silently drop the section.
3489
+ * 2. `slots.inject('settings.section', …)` waits for the slot *declaration*,
3490
+ * which `dsh-client-ui-settings-general` publishes later. Registering
3491
+ * eagerly instead would throw and fail the boot.
3492
+ *
3493
+ * `order: 22` sorts the section after the shipped ones (general 0, models 10,
3494
+ * plugins 15, agent-presets 20, chat-import 21). The slot accepts no icon
3495
+ * field, so the navigation entry takes the host's default glyph.
3496
+ *
3497
+ * @param ctx - client root context.
3498
+ * @returns a disposer that tears the registration down.
3499
+ */
3500
+ function installSettingsSection(ctx) {
3501
+ if (typeof ctx.inject !== 'function') return function () {}
3502
+ var fiber = ctx.inject(['slots'], function (scope) {
3503
+ var slots = scope.get('slots')
3504
+ if (slots === void 0 || slots === null || typeof slots.inject !== 'function') return
3505
+ scope.effect(function () {
3506
+ return slots.inject('settings.section', function () {
3507
+ return slots.register(
3508
+ { name: 'settings.section', id: 'claude-style', order: 22, label: function () { return 'Claude Style' } },
3509
+ BrandSettingsSection,
3510
+ )
3511
+ })
3512
+ }, 'dsh-claude-style: settings section')
3513
+ })
3514
+ return function () {
3515
+ try {
3516
+ if (fiber && typeof fiber.dispose === 'function') fiber.dispose()
3517
+ } catch (error) {
3518
+ /* the fiber may already be gone during teardown */
3519
+ }
3520
+ }
3521
+ }
3522
+
3523
+ // ============================================================================
3524
+ // Zone 6: 插件入口与导出 (Plugin Entry & Export)
3525
+ // ============================================================================
3526
+ function apply(ctx) {
3527
+ var body = document.body
3528
+ body.setAttribute('data-dsh-claude-style', '')
3529
+ applyBrand(readStoredBrand())
3530
+
3531
+ var old = document.getElementById(STYLE_ID)
3532
+ if (old && old.parentElement) old.parentElement.removeChild(old)
3533
+
3534
+ var style = document.createElement('style')
3535
+ style.id = STYLE_ID
3536
+ style.dataset.skinChrome = 'dsh-claude-style-style'
3537
+ style.textContent = CSS
3538
+ document.head.appendChild(style)
3539
+
3540
+ var stopOverrides = installOverrides(ctx)
3541
+ var stopSettings = installSettingsSection(ctx)
3542
+
3543
+ ctx.effect(function () {
3544
+ return function () {
3545
+ stopOverrides()
3546
+ stopSettings()
3547
+ body.removeAttribute('data-dsh-claude-style')
3548
+ body.removeAttribute(BRAND_ATTR)
3549
+ var el = document.getElementById(STYLE_ID)
3550
+ if (el) el.remove()
3551
+ }
3552
+ }, 'dsh-claude-style: Claude Code Desktop theme')
3553
+ }
3554
+
3555
+ exports.apply = apply
3556
+ return module.exports
3557
+
3558
+ },
3559
+ })