diff-chat 0.1.0__py3-none-any.whl

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.
Files changed (91) hide show
  1. adapters/README.md +28 -0
  2. adapters/__init__.py +48 -0
  3. adapters/_base.py +102 -0
  4. adapters/_cli.py +405 -0
  5. adapters/claude.py +141 -0
  6. adapters/gemini.py +323 -0
  7. adapters/gpt.py +217 -0
  8. adapters/local.py +146 -0
  9. adapters/registry.py +33 -0
  10. api_fallback.py +189 -0
  11. app.py +827 -0
  12. app_preferences.py +205 -0
  13. archive_schema.py +142 -0
  14. attachments.py +129 -0
  15. chat_titles.py +60 -0
  16. connection_handoff.py +64 -0
  17. context_engine.py +256 -0
  18. conversation_actions.py +160 -0
  19. diff_chat-0.1.0.dist-info/METADATA +101 -0
  20. diff_chat-0.1.0.dist-info/RECORD +91 -0
  21. diff_chat-0.1.0.dist-info/WHEEL +4 -0
  22. diff_chat-0.1.0.dist-info/entry_points.txt +2 -0
  23. diff_chat-0.1.0.dist-info/licenses/LICENSE +21 -0
  24. diff_chat_assets/memory.example.md +1 -0
  25. diff_chat_assets/prompts/about_you_export.md +19 -0
  26. diff_chat_assets/settings.json +6 -0
  27. diff_chat_assets/static/about-you-parser.js +46 -0
  28. diff_chat_assets/static/about-you.js +171 -0
  29. diff_chat_assets/static/actions.css +275 -0
  30. diff_chat_assets/static/actions.js +650 -0
  31. diff_chat_assets/static/app.css +345 -0
  32. diff_chat_assets/static/app.js +1344 -0
  33. diff_chat_assets/static/attachments.js +80 -0
  34. diff_chat_assets/static/brand/favicon-32.png +0 -0
  35. diff_chat_assets/static/brand/icon.svg +11 -0
  36. diff_chat_assets/static/brand/wordmark-dark.svg +15 -0
  37. diff_chat_assets/static/brand/wordmark-light.svg +13 -0
  38. diff_chat_assets/static/characters/CREDITS.md +7 -0
  39. diff_chat_assets/static/characters/characters.css +37 -0
  40. diff_chat_assets/static/characters/claude.json +507 -0
  41. diff_chat_assets/static/characters/claude.png +0 -0
  42. diff_chat_assets/static/characters/claude.webp +0 -0
  43. diff_chat_assets/static/characters/gemini.json +54 -0
  44. diff_chat_assets/static/characters/gemini.png +0 -0
  45. diff_chat_assets/static/characters/gemini.webp +0 -0
  46. diff_chat_assets/static/characters/gpt.json +507 -0
  47. diff_chat_assets/static/characters/gpt.png +0 -0
  48. diff_chat_assets/static/characters/gpt.webp +0 -0
  49. diff_chat_assets/static/characters/local.json +387 -0
  50. diff_chat_assets/static/characters/local.png +0 -0
  51. diff_chat_assets/static/characters/local.webp +0 -0
  52. diff_chat_assets/static/characters/player.js +318 -0
  53. diff_chat_assets/static/chat-filing.js +84 -0
  54. diff_chat_assets/static/controls.js +194 -0
  55. diff_chat_assets/static/corners.css +59 -0
  56. diff_chat_assets/static/craft.css +246 -0
  57. diff_chat_assets/static/drafts.js +41 -0
  58. diff_chat_assets/static/index.html +208 -0
  59. diff_chat_assets/static/library.css +30 -0
  60. diff_chat_assets/static/library.js +181 -0
  61. diff_chat_assets/static/memory.js +81 -0
  62. diff_chat_assets/static/preference-dialog.js +21 -0
  63. diff_chat_assets/static/preferences.css +56 -0
  64. diff_chat_assets/static/session.js +46 -0
  65. diff_chat_assets/static/settings.css +111 -0
  66. diff_chat_assets/static/settings.js +463 -0
  67. diff_chat_assets/static/setup.js +238 -0
  68. diff_chat_assets/static/utility.js +64 -0
  69. diff_chat_assets/static/vendor/LICENSES.txt +531 -0
  70. diff_chat_assets/static/vendor/highlight.min.js +1262 -0
  71. diff_chat_assets/static/vendor/markdown-it.min.js +13 -0
  72. diff_chat_assets/static/vendor/plex-mono.woff2 +0 -0
  73. diff_chat_assets/static/vendor/plex-sans.woff2 +0 -0
  74. diff_launcher.py +93 -0
  75. discussion.py +239 -0
  76. history_search.py +68 -0
  77. library_manager.py +251 -0
  78. model_options.py +132 -0
  79. plan_usage.py +72 -0
  80. private_store.py +71 -0
  81. probe.py +195 -0
  82. runtime_paths.py +195 -0
  83. server_security.py +100 -0
  84. setup_status.py +123 -0
  85. shared_memory.py +189 -0
  86. storage.py +185 -0
  87. usage_budget.py +77 -0
  88. usage_claude.py +110 -0
  89. usage_codex.py +170 -0
  90. usage_gemini.py +70 -0
  91. utility_models.py +104 -0
@@ -0,0 +1,19 @@
1
+ I'm moving to another AI tool and want it to know me the way you do. Based on what you know about me from our conversations and your memory, write a concise profile of me in plain markdown bullets, under these headings:
2
+
3
+ ## Who I am
4
+ (name, what I do or study, where I'm based)
5
+
6
+ ## What I'm working on
7
+ (ongoing projects and goals)
8
+
9
+ ## How I like answers
10
+ (tone, length, format, what to avoid)
11
+
12
+ ## Interests and context
13
+ (things that would help an AI give me relevant answers)
14
+
15
+ Rules:
16
+ - Only include things I've actually told you or that are clearly established. No guesses.
17
+ - One short fact per bullet. Keep it under 40 bullets total.
18
+ - Leave out sensitive information: health, finances, passwords, account numbers, and other people's private details.
19
+ - Output only the markdown, nothing else.
@@ -0,0 +1,6 @@
1
+ {
2
+ "timeout_seconds": 120,
3
+ "summary_threshold": 60000,
4
+ "rolling_threshold": 40000,
5
+ "display_name": "you"
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ // Treat only explicit list items as facts. Prose around a list never enters memory.
4
+ function parseAboutYou(source) {
5
+ const groups = [];
6
+ let heading = "", group = null, fence = null, markdownFence = null;
7
+ const known = ["who i am", "what i'm working on", "how i like answers", "interests and context"];
8
+ const lines = source.replace(/\r\n?/g, "\n").trim().split("\n");
9
+ // Chat apps sometimes wrap the entire answer in a Markdown code block.
10
+ const wrapper = lines[0]?.trim().match(/^(`{3,}|~{3,})(?:markdown|md)?\s*$/i);
11
+ if (wrapper && lines.at(-1)?.trim() === wrapper[1]) {
12
+ lines.shift(); lines.pop();
13
+ }
14
+ for (const [index, raw] of lines.entries()) {
15
+ const line = raw.trim().replace(/^(?:>\s*)+/, "").trim();
16
+ const fenceMark = line.match(/^(`{3,}|~{3,})/);
17
+ if (fence) {
18
+ if (line[0] === fence[0] && line.length >= fence.length && [...line].every(c => c === fence[0])) fence = null;
19
+ continue;
20
+ }
21
+ if (markdownFence && line === markdownFence) { markdownFence = null; continue; }
22
+ if (fenceMark) {
23
+ if (/^(?:`{3,}|~{3,})(?:markdown|md)\s*$/i.test(line)) markdownFence = fenceMark[1];
24
+ else fence = fenceMark[1];
25
+ continue;
26
+ }
27
+ const bullet = line.match(/^(?:[-*+•–]|\d+[.)])\s+(.+)$/u);
28
+ if (bullet) {
29
+ const fact = bullet[1].replace(/^\[[ xX]\]\s*/, "").trim();
30
+ if (!fact || /^[-*_\s]+$/.test(fact)) continue;
31
+ if (!group) { group = {heading, facts: []}; groups.push(group); }
32
+ group.facts.push(fact);
33
+ continue;
34
+ }
35
+ const atx = line.match(/^#{1,6}\s+(.+?)(?:\s+#+)?$/);
36
+ const bold = line.match(/^(\*\*|__)(.+?)\1:?$/);
37
+ const plain = line.replace(/:$/, "").replace(/’/g, "'").toLowerCase();
38
+ const setext = line && /^\s*(?:={3,}|-{3,})\s*$/.test(lines[index + 1] || "");
39
+ if (atx || bold || known.includes(plain) || setext) {
40
+ heading = (atx?.[1] || bold?.[2] || line).replace(/^(\*\*|__)(.+)\1$/, "$2").replace(/:$/, "").trim();
41
+ group = null;
42
+ }
43
+ }
44
+ return groups;
45
+ }
46
+ if (typeof module !== "undefined") module.exports = {parseAboutYou};
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+
3
+ (() => {
4
+ const panel = preferenceDialog("about-you-import", "About you", `
5
+ <p id="profile-step" class="settings-kicker"></p>
6
+ <section data-stage="1">
7
+ <label for="profile-prompt">Paste this into ChatGPT, Claude, or whichever AI knows you best.</label>
8
+ <textarea id="profile-prompt" rows="7" readonly></textarea>
9
+ <button id="profile-copy" type="button" class="settings-action">Copy</button>
10
+ </section>
11
+ <section data-stage="2" hidden>
12
+ <label for="profile-reply">Paste its reply here.</label>
13
+ <textarea id="profile-reply" rows="8" autocomplete="off" spellcheck="false" placeholder="Paste a list of facts, grouped under headings."></textarea>
14
+ </section>
15
+ <section data-stage="3" hidden>
16
+ <p class="preference-description">These are sent to every participant on every message. Untick anything you'd rather keep private.</p>
17
+ <div id="profile-checklist"></div>
18
+ </section>
19
+ <section data-stage="4" hidden><p>Saved to shared memory for all chats.</p></section>
20
+ <div id="profile-size" hidden>
21
+ <label for="profile-meter">Shared memory</label><span id="profile-count"></span>
22
+ <meter id="profile-meter" min="0" max="4000"></meter>
23
+ </div>
24
+ <div class="preference-footer">
25
+ <button id="profile-back" type="button" class="quiet-button">Back</button>
26
+ <button id="profile-next" type="button" class="preference-save">Next</button>
27
+ </div>`);
28
+ const prompt = byId("profile-prompt"), reply = byId("profile-reply");
29
+ const list = byId("profile-checklist"), next = byId("profile-next"), back = byId("profile-back");
30
+ const size = byId("profile-size"), meter = byId("profile-meter"), copy = byId("profile-copy");
31
+ const endpoint = "/api/settings/memory/import";
32
+ const count = value => Array.from(value).length;
33
+ let stage, meta, saved, previousReply, busy, session = 0;
34
+
35
+ function selected() {
36
+ return [...list.children].map(section => ({
37
+ heading: section.dataset.heading,
38
+ facts: [...section.querySelectorAll(".profile-fact")].filter(row => row.firstChild.checked)
39
+ .map(row => row.lastChild.value.trim())
40
+ })).filter(group => group.facts.length);
41
+ }
42
+
43
+ function setMeter(total) {
44
+ meter.max = meta.limit; meter.value = Math.min(total, meta.limit);
45
+ byId("profile-count").textContent = total.toLocaleString() + " / " + meta.limit.toLocaleString() + " characters";
46
+ }
47
+
48
+ function reviewSize() {
49
+ const groups = selected();
50
+ const markdown = groups.map(({heading, facts}) => [
51
+ ...(heading ? ["### " + heading] : []), ...facts.map(fact => "- " + fact)
52
+ ].join("\n")).join("\n\n");
53
+ const total = meta.fixed_chars + 1 + count(markdown);
54
+ setMeter(total);
55
+ let warning = "";
56
+ if (!groups.length) warning = "Select at least one fact to save.";
57
+ else if (groups.some(group => group.facts.includes(""))) warning = "Edit or untick each empty fact.";
58
+ else if (total > meta.limit) warning = "Trim " + (total - meta.limit).toLocaleString() + " characters before saving.";
59
+ panel.status.textContent = warning;
60
+ next.disabled = busy || Boolean(warning);
61
+ }
62
+
63
+ function checklist(groups) {
64
+ list.replaceChildren();
65
+ for (const {heading, facts} of groups) {
66
+ const section = element("fieldset");
67
+ section.dataset.heading = heading;
68
+ section.append(element("legend", "", heading || "Facts"));
69
+ for (const fact of facts) {
70
+ const row = element("div", "profile-fact"), check = element("input"), edit = element("textarea");
71
+ check.type = "checkbox"; check.checked = true;
72
+ edit.rows = 1; edit.value = fact; edit.spellcheck = false; edit.autocomplete = "off";
73
+ edit.setAttribute("aria-label", "Edit fact");
74
+ check.setAttribute("aria-label", "Include " + fact);
75
+ check.onchange = () => { edit.disabled = !check.checked; reviewSize(); };
76
+ edit.oninput = () => {
77
+ edit.value = edit.value.replace(/[\r\n]+/g, " ");
78
+ check.setAttribute("aria-label", "Include " + edit.value); reviewSize();
79
+ };
80
+ row.append(check, edit); section.append(row);
81
+ }
82
+ list.append(section);
83
+ }
84
+ }
85
+
86
+ function show(number) {
87
+ stage = number;
88
+ for (const section of panel.body.querySelectorAll("[data-stage]")) section.hidden = Number(section.dataset.stage) !== stage;
89
+ const labels = ["", "1 of 3 · Get your profile", "2 of 3 · Paste reply", "3 of 3 · Review facts", "Import complete"];
90
+ byId("profile-step").textContent = labels[stage];
91
+ size.hidden = stage < 3;
92
+ back.hidden = stage === 1 || stage === 4;
93
+ next.textContent = ["", "Next", "Review facts", "Save", "Done"][stage];
94
+ next.disabled = !meta || (stage === 2 && !reply.value.trim());
95
+ panel.status.textContent = "";
96
+ if (stage === 3) reviewSize();
97
+ if (stage === 4) setMeter(count(saved.value));
98
+ if (number === 2) reply.focus();
99
+ else if (number === 3) list.querySelector("input")?.focus();
100
+ else if (number === 4) next.focus();
101
+ }
102
+
103
+ window.openDiffAboutYou = () => {
104
+ if (panel.dialog.open) return Promise.resolve(null);
105
+ const id = ++session;
106
+ meta = saved = previousReply = null; busy = false;
107
+ prompt.value = reply.value = ""; list.replaceChildren(); copy.disabled = true;
108
+ panel.show(); show(1); panel.status.textContent = "Loading export prompt…";
109
+ api(endpoint).then(details => {
110
+ if (id !== session || !panel.dialog.open) return;
111
+ meta = details; prompt.value = meta.prompt; copy.disabled = false; show(1);
112
+ }).catch(error => { if (id === session) panel.status.textContent = error.message; });
113
+ return new Promise(resolve => panel.dialog.addEventListener("close", () => {
114
+ ++session; prompt.value = reply.value = ""; previousReply = null; list.replaceChildren();
115
+ resolve(saved); saved = meta = null;
116
+ }, {once:true}));
117
+ };
118
+ copy.onclick = async () => {
119
+ try { await navigator.clipboard.writeText(prompt.value); panel.status.textContent = "Prompt copied."; }
120
+ catch { prompt.focus(); prompt.select(); panel.status.textContent = "Prompt selected. Use your copy shortcut."; }
121
+ };
122
+ reply.oninput = () => { next.disabled = !reply.value.trim(); panel.status.textContent = ""; };
123
+ back.onclick = () => show(stage - 1);
124
+ next.onclick = async () => {
125
+ if (stage === 1) return show(2);
126
+ if (stage === 2) {
127
+ if (reply.value !== previousReply) {
128
+ const groups = parseAboutYou(reply.value);
129
+ if (!groups.length) { panel.status.textContent = "No bullets found. Start each fact with a dash and a space."; return; }
130
+ checklist(groups); previousReply = reply.value;
131
+ }
132
+ return show(3);
133
+ }
134
+ if (stage === 4) return panel.dialog.close();
135
+ if (busy || next.disabled) return;
136
+ if (meta.replace && !await window.diffConfirm("Replace the previous import?", "Your selected facts will replace the last imported profile. Other shared notes are kept.", "Replace import")) return;
137
+ busy = true; next.disabled = back.disabled = true;
138
+ const close = panel.dialog.querySelector(".preference-head button");
139
+ close.disabled = true; list.inert = true;
140
+ try {
141
+ saved = await api(endpoint, {revision:meta.revision, replace:meta.replace, groups:selected()});
142
+ show(4);
143
+ } catch (error) {
144
+ if (error.status === 409) {
145
+ try { meta = await api(endpoint); } catch { /* Keep the original error visible. */ }
146
+ }
147
+ panel.status.textContent = error.message;
148
+ } finally {
149
+ busy = false; back.disabled = close.disabled = list.inert = false;
150
+ if (stage === 3) {
151
+ const message = panel.status.textContent;
152
+ reviewSize();
153
+ panel.status.textContent = [message, panel.status.textContent].filter(Boolean).join(" ");
154
+ }
155
+ }
156
+ };
157
+ panel.dialog.addEventListener("cancel", event => { if (busy) event.preventDefault(); });
158
+
159
+ const offer = preferenceDialog("profile-setup", "Bring your preferences", `
160
+ <p class="preference-description">Import a profile from another AI to share across your chats. You can also do this later in Settings → Memory.</p>
161
+ <div class="preference-footer"><button type="button" class="quiet-button">Skip for now</button>
162
+ <button type="button" class="preference-save">Import from another AI</button></div>`);
163
+ offer.body.querySelector(".quiet-button").onclick = () => offer.dialog.close();
164
+ offer.body.querySelector(".preference-save").onclick = async () => {
165
+ if (await window.openDiffAboutYou()) offer.dialog.close();
166
+ };
167
+ window.diffOfferMemoryImport = () => {
168
+ offer.show();
169
+ return new Promise(resolve => offer.dialog.addEventListener("close", resolve, {once:true}));
170
+ };
171
+ })();
@@ -0,0 +1,275 @@
1
+ .round-metadata,
2
+ .menu-caption,
3
+ .message-edit .edit-caption {
4
+ font: 400 11px/1.6 var(--mono);
5
+ color: var(--metadata);
6
+ font-variant-numeric: tabular-nums;
7
+ }
8
+ #round-actions {
9
+ container-type: inline-size;
10
+ margin-block: 28px 0;
11
+ color: var(--ink);
12
+ }
13
+ #round-actions[hidden],
14
+ .diff-panel[hidden],
15
+ .command-options[hidden],
16
+ .message-tools [hidden] {
17
+ display: none;
18
+ }
19
+ .round-choices { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
20
+ .round-anchor { position:relative; }
21
+ .round-choice, .round-button, .diff-toggle {
22
+ border:1px solid var(--rule); --corner-radius:6px;
23
+ background:transparent; color:light-dark(#1c1b19,#ecebe7);
24
+ font:400 13px/20px "IBM Plex Sans",var(--ui);
25
+ }
26
+ #round-actions .round-choice, #round-actions .round-button {
27
+ height:32px; min-height:32px; padding:4px 10px;
28
+ display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap;
29
+ --corner-radius:6px;
30
+ }
31
+ #round-actions .round-choice .icon, .participant-menu .icon { width:14px; height:14px; stroke-width:1.5; color:var(--muted); }
32
+ .round-combine .icon:last-child { width:12px; margin-left:-4px; }
33
+ .round-continue:enabled {border-color:var(--edge);}
34
+ .round-choice:hover:enabled,.round-button:hover:enabled,.round-choice[aria-expanded="true"],.diff-toggle:hover:enabled,.diff-toggle[aria-pressed="true"] {
35
+ background:var(--inset);color:light-dark(#1c1b19,#ecebe7);
36
+ }
37
+ .round-choice:disabled {opacity:.5;}
38
+ .round-confirm {display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
39
+ .round-estimate {font:400 13px/20px var(--ui);color:var(--secondary);margin-right:4px;}
40
+ .action-tooltip {
41
+ position:absolute;z-index:5;bottom:calc(100% + 6px);left:0;
42
+ padding:4px 8px; width:max-content;max-width:min(220px,75vw);
43
+ background:var(--ink);color:var(--paper);border-radius:6px;
44
+ font:400 13px/18px "IBM Plex Sans",var(--ui);pointer-events:none;
45
+ opacity:0;visibility:hidden;
46
+ }
47
+ .round-anchor:hover .action-tooltip,.round-anchor:focus-within .action-tooltip {
48
+ opacity:1;visibility:visible;transition:opacity 100ms ease-out 400ms,visibility 0s linear 400ms;
49
+ }
50
+ .round-anchor:has([aria-expanded="true"]) .action-tooltip {visibility:hidden;}
51
+ .round-anchor:last-child .action-tooltip {left:auto;right:0;}
52
+ @container (max-width:360px) {
53
+ #round-actions .round-choice {padding-inline:6px;gap:4px;}
54
+ }
55
+ @container (max-width:310px) {
56
+ #round-actions .round-choice {padding-inline:2px;gap:2px;letter-spacing:-.015em;}
57
+ }
58
+ .combine-popover,
59
+ .command-options {
60
+ position: absolute;
61
+ z-index: 6;
62
+ padding: 4px;
63
+ color: var(--ink);
64
+ background: var(--surface);
65
+ border: 1px solid var(--edge);
66
+ --corner-radius: 8px;
67
+ box-shadow: 0 1px 4px rgb(0 0 0 / 9%);
68
+ }
69
+ .combine-popover {
70
+ bottom: calc(100% + 4px);
71
+ right: 0;
72
+ min-width: 148px;
73
+ }
74
+ .participant-menu .menu-caption {
75
+ padding: 4px 8px;
76
+ margin: 0;
77
+ text-transform: uppercase;
78
+ }
79
+ .participant-menu button,
80
+ .command-options button {
81
+ width: 100%;
82
+ display: flex;
83
+ align-items: center;
84
+ gap: 12px;
85
+ text-align: left;
86
+ font: 400 13px/1.6 var(--ui);
87
+ padding: 4px 8px;
88
+ --corner-radius: 4px;
89
+ }
90
+ .participant-menu button .icon {
91
+ margin-left: auto;
92
+ }
93
+ .participant-menu button { min-height: 40px; }
94
+ @media (pointer: coarse) { .participant-menu button { min-height: 44px; } }
95
+ .participant-menu button:hover:enabled,
96
+ .command-options button:hover,
97
+ .command-options button[aria-selected="true"] {
98
+ background: var(--selected);
99
+ color: var(--ink);
100
+ text-decoration: none;
101
+ }
102
+ .participant-menu button:enabled { color: var(--model); }
103
+ #compose-form {
104
+ position: relative;
105
+ }
106
+ .command-options {
107
+ bottom: calc(100% + 8px);
108
+ left: 0;
109
+ max-width: 100%;
110
+ min-width: min(312px, 100%);
111
+ }
112
+ .command-hint {
113
+ color: var(--muted);
114
+ }
115
+ .message {
116
+ position: relative;
117
+ }
118
+ .message-tools {
119
+ display: inline-flex;
120
+ align-items: center;
121
+ gap: 0;
122
+ margin-left: auto;
123
+ }
124
+ .message-tools button {
125
+ min-height: 24px;
126
+ min-width: 24px;
127
+ padding: 4px;
128
+ color: var(--muted);
129
+ background: transparent;
130
+ border: none;
131
+ --corner-radius: 4px;
132
+ line-height: 1;
133
+ margin: 0;
134
+ display: inline-grid;
135
+ place-items: center;
136
+ }
137
+ .message-tools .icon {
138
+ width: 16px;
139
+ height: 16px;
140
+ fill: none;
141
+ stroke: currentColor;
142
+ stroke-width: 1.5;
143
+ stroke-linecap: round;
144
+ stroke-linejoin: round;
145
+ }
146
+ .message-tools button:hover:enabled {
147
+ background: var(--inset);
148
+ color: var(--model, var(--ink));
149
+ }
150
+ @media (hover: hover) {
151
+ .message-tools {
152
+ opacity: 0;
153
+ transition: opacity 150ms ease-out;
154
+ }
155
+ .message:is(:hover, :focus-within) .message-tools {
156
+ opacity: 1;
157
+ }
158
+ }
159
+ .message-edit {
160
+ margin-top: 8px;
161
+ }
162
+ .message-edit textarea {
163
+ box-sizing: border-box;
164
+ width: 100%;
165
+ min-height: 96px;
166
+ color: var(--ink);
167
+ background: var(--surface);
168
+ border: 1px solid var(--edge);
169
+ --corner-radius: 8px;
170
+ padding: 8px;
171
+ font: 400 15px/1.6 var(--sans);
172
+ }
173
+ .message-edit button {
174
+ font: 500 13px var(--ui);
175
+ margin-right: 8px;
176
+ padding: 4px 8px;
177
+ background: var(--inset);
178
+ --corner-radius: 4px;
179
+ }
180
+ .message-edit .edit-caption {
181
+ margin: 4px 0 8px;
182
+ }
183
+ .message.combined {
184
+ padding: 16px;
185
+ background: var(--library);
186
+ --corner-radius: 8px;
187
+ }
188
+ .message.combined .speaker {
189
+ display: none;
190
+ }
191
+ .message.combined .reply-workflow {
192
+ font: 500 11px/1.6 var(--mono);
193
+ color: var(--model);
194
+ text-transform: uppercase;
195
+ }
196
+ .round-metadata {
197
+ display: flex;
198
+ gap: 8px;
199
+ align-items: center;
200
+ text-transform: uppercase;
201
+ }
202
+ .diff-round:has(.diff-panel[hidden]) {
203
+ margin-bottom: -16px;
204
+ }
205
+ .diff-toggle {
206
+ min-height: 32px;
207
+ padding: 4px 8px;
208
+ text-transform: none;
209
+ letter-spacing: normal;
210
+ }
211
+ .diff-toggle .icon { color: currentColor; }
212
+ @media (pointer: coarse) { .round-metadata .diff-toggle { min-height: 44px; } }
213
+ .diff-summary {
214
+ display: grid;
215
+ grid-template-columns: repeat(2, minmax(0, 1fr));
216
+ gap: 24px;
217
+ margin: 12px 0 20px;
218
+ padding: 16px;
219
+ --corner-radius: 8px;
220
+ background: var(--library);
221
+ }
222
+ .diff-points h3 {
223
+ margin: 0 0 8px;
224
+ font: 500 13px/1.6 var(--ui);
225
+ color: var(--ink);
226
+ }
227
+ .diff-points p,
228
+ .diff-points li {
229
+ color: var(--secondary);
230
+ font: 400 15px/1.6 var(--sans);
231
+ }
232
+ .diff-points p,
233
+ .diff-points ul {
234
+ margin: 0;
235
+ }
236
+ .diff-points ul {
237
+ padding-left: 16px;
238
+ }
239
+ .diff-points li + li {
240
+ margin-top: 4px;
241
+ }
242
+ .diff-columns {
243
+ display: grid;
244
+ grid-template-columns: repeat(2, minmax(0, 1fr));
245
+ gap: 24px;
246
+ }
247
+ .diff-columns .byline {
248
+ gap: 4px 8px;
249
+ }
250
+ .diff-columns .message-tools {
251
+ flex-shrink: 0;
252
+ }
253
+ .diff-columns .speaker {
254
+ color: var(--model);
255
+ }
256
+ @media (max-width: 899px) {
257
+ .diff-columns,
258
+ .diff-summary {
259
+ grid-template-columns: minmax(0, 1fr);
260
+ }
261
+ .diff-summary {
262
+ gap: 12px;
263
+ }
264
+ }
265
+ @media (prefers-reduced-motion: reduce) {
266
+ .message-tools {
267
+ transition: none;
268
+ }
269
+ }
270
+
271
+ .participant-menu {position:fixed;inset:auto;margin:0;max-height:min(400px, 75dvh);overflow:auto;}
272
+ .participant-menu button[role="menuitemradio"] {justify-content:space-between;}
273
+ .diff-picker {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 16px;color:var(--secondary);}
274
+ .diff-picker .select-trigger {width:auto;}
275
+ .comparison-scope {margin:8px 0 0;font:400 11px/16px var(--mono);color:var(--metadata);text-transform:uppercase;}