@causyne/agent 1.20.124 → 1.20.127
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/bin/causyne.js +1 -1
- package/package.json +4 -4
- package/src/acp/protocol.ts +19 -1
- package/src/acp/server.js +282 -8
- package/src/acp/server.ts +284 -8
- package/src/agent/abortableDelay.js +2 -2
- package/src/agent/abortableDelay.ts +2 -2
- package/src/agent/errorClassifier.js +9 -1
- package/src/agent/errorClassifier.ts +8 -1
- package/src/agentLoop.js +83 -27
- package/src/agentLoop.ts +92 -26
- package/src/approvalPolicy.js +34 -10
- package/src/approvalPolicy.ts +42 -11
- package/src/browser/causyneBrowser.js +30 -3
- package/src/browser/causyneBrowser.ts +33 -3
- package/src/browser/urlPolicy.js +14 -1
- package/src/browser/urlPolicy.ts +12 -1
- package/src/cliMode.js +21 -9
- package/src/cliMode.ts +20 -8
- package/src/commands.js +188 -32
- package/src/commands.ts +209 -32
- package/src/config.js +19 -4
- package/src/config.ts +18 -4
- package/src/core/contextCompactor.js +54 -7
- package/src/core/contextCompactor.ts +63 -7
- package/src/core/goalLoop.js +257 -0
- package/src/core/goalLoop.ts +310 -0
- package/src/entrypoint.js +135 -3
- package/src/entrypoint.ts +136 -3
- package/src/game/causyneCoreBridge.js +686 -0
- package/src/game/causyneCoreBridge.ts +702 -0
- package/src/game/gameLauncher.js +287 -0
- package/src/game/gameLauncher.ts +352 -0
- package/src/game/gameProvisioner.js +425 -0
- package/src/game/gameProvisioner.ts +488 -0
- package/src/headlessCli.js +19 -12
- package/src/headlessCli.ts +22 -8
- package/src/infra/atomicWriter.js +40 -4
- package/src/infra/atomicWriter.ts +36 -4
- package/src/launchIntent.js +73 -3
- package/src/launchIntent.ts +76 -3
- package/src/lsp/lspClient.js +83 -12
- package/src/lsp/lspClient.ts +75 -12
- package/src/mcp/mcpRegistry.js +75 -8
- package/src/mcp/mcpRegistry.ts +70 -7
- package/src/memory/contextBudget.js +2 -0
- package/src/memory/contextBudget.ts +1 -0
- package/src/modelVariants.js +45 -0
- package/src/modelVariants.ts +54 -0
- package/src/outputRecovery.js +3 -2
- package/src/outputRecovery.ts +4 -2
- package/src/permissionPresets.js +327 -0
- package/src/permissionPresets.ts +361 -0
- package/src/providers/antigravity.js +62 -9
- package/src/providers/antigravity.ts +73 -9
- package/src/providers/byokHttp.js +7 -1
- package/src/providers/byokHttp.ts +6 -1
- package/src/providers/byokStream.js +21 -8
- package/src/providers/byokStream.ts +17 -7
- package/src/providers/dashscope-byok.js +21 -5
- package/src/providers/dashscope-byok.ts +29 -11
- package/src/providers/moonshot.js +26 -7
- package/src/providers/moonshot.ts +34 -13
- package/src/providers/muse.js +6 -0
- package/src/providers/muse.ts +8 -0
- package/src/providers/ollama.js +39 -7
- package/src/providers/ollama.ts +36 -7
- package/src/providers/openai-compatible.js +16 -3
- package/src/providers/openai-compatible.ts +13 -3
- package/src/providers/openai.js +62 -4
- package/src/providers/openai.ts +50 -4
- package/src/providers/openrouter.js +19 -4
- package/src/providers/openrouter.ts +21 -4
- package/src/providers/qwen-byok.js +21 -5
- package/src/providers/qwen-byok.ts +29 -11
- package/src/providers/xai.js +26 -10
- package/src/providers/xai.ts +34 -16
- package/src/reporting.js +4 -2
- package/src/reporting.ts +4 -2
- package/src/sandbox.js +34 -0
- package/src/sandbox.ts +43 -0
- package/src/scheduler/scheduler.js +372 -0
- package/src/scheduler/scheduler.ts +433 -0
- package/src/sessionSearchIndex.js +267 -0
- package/src/sessionSearchIndex.ts +311 -0
- package/src/skillsManager.js +2 -3
- package/src/skillsManager.ts +2 -3
- package/src/toolPacks.js +6 -0
- package/src/toolPacks.ts +6 -0
- package/src/tools/applyPatch.js +1 -1
- package/src/tools/applyPatch.ts +1 -1
- package/src/tools/generateMediaViaApi.js +4 -3
- package/src/tools/generateMediaViaApi.ts +4 -3
- package/src/tools/nativeEngine.js +2 -2
- package/src/tools/nativeEngine.ts +2 -2
- package/src/tools/openSourceToolProvisioner.js +2 -2
- package/src/tools/openSourceToolProvisioner.ts +2 -2
- package/src/tools/payloadSanitizer.js +0 -1
- package/src/tools/payloadSanitizer.ts +0 -1
- package/src/tools/pdfReader.js +122 -20
- package/src/tools/pdfReader.ts +111 -20
- package/src/tools/presentDeliverable.js +103 -0
- package/src/tools/presentDeliverable.ts +127 -0
- package/src/tools/ptcRuntime.js +444 -0
- package/src/tools/ptcRuntime.ts +490 -0
- package/src/tools/ptyTerminal.js +1096 -0
- package/src/tools/ptyTerminal.ts +1231 -0
- package/src/tools/registry.js +21 -12
- package/src/tools/registry.ts +21 -12
- package/src/tools/toolOutputStore.js +26 -4
- package/src/tools/toolOutputStore.ts +22 -4
- package/src/tools/webFetch.js +158 -11
- package/src/tools/webFetch.ts +145 -11
- package/src/tools/webSearch.js +123 -36
- package/src/tools/webSearch.ts +124 -33
- package/src/tui/banner.js +5 -1
- package/src/tui/banner.ts +6 -1
- package/src/tui/chatRenderer.js +1 -2
- package/src/tui/chatRenderer.ts +1 -2
- package/src/tui/completion.js +1 -0
- package/src/tui/completion.ts +1 -0
- package/src/tui/composerControls.js +111 -27
- package/src/tui/composerControls.ts +124 -28
- package/src/tui/dialogs.js +3 -16
- package/src/tui/dialogs.ts +3 -16
- package/src/tui/home.js +1 -0
- package/src/tui/home.ts +1 -0
- package/src/tui/invocation.js +1 -2
- package/src/tui/invocation.ts +1 -2
- package/src/tui/modelPicker.js +22 -12
- package/src/tui/modelPicker.ts +22 -12
- package/src/tui/overlay.js +2 -5
- package/src/tui/overlay.ts +2 -5
- package/src/tui/prompt.js +6 -4
- package/src/tui/prompt.ts +6 -4
- package/src/tui/selectList.js +4 -12
- package/src/tui/selectList.ts +4 -12
- package/src/tui/setup.js +22 -9
- package/src/tui/setup.ts +26 -9
- package/src/tui/statusLine.ts +2 -0
- package/src/web/client/browserPanel.js +702 -0
- package/src/web/client/browserPanel.ts +663 -0
- package/src/web/client/chatStream.js +309 -0
- package/src/web/client/chatStream.ts +289 -0
- package/src/web/client/cliPanel.js +165 -0
- package/src/web/client/cliPanel.ts +171 -0
- package/src/web/client/composer.js +204 -0
- package/src/web/client/composer.ts +209 -0
- package/src/web/client/diffPanel.js +176 -0
- package/src/web/client/diffPanel.ts +203 -0
- package/src/web/client/dom.js +220 -0
- package/src/web/client/dom.ts +221 -0
- package/src/web/client/filesAndCanvas.js +231 -0
- package/src/web/client/filesAndCanvas.ts +238 -0
- package/src/web/client/gameLauncherUi.js +78 -0
- package/src/web/client/gameLauncherUi.ts +78 -0
- package/src/web/client/main.js +301 -0
- package/src/web/client/main.ts +368 -0
- package/src/web/client/markdown.js +364 -0
- package/src/web/client/markdown.ts +373 -0
- package/src/web/client/modelPicker.js +455 -0
- package/src/web/client/modelPicker.ts +451 -0
- package/src/web/client/permissionPresetsUi.js +307 -0
- package/src/web/client/permissionPresetsUi.ts +333 -0
- package/src/web/client/sessions.js +353 -0
- package/src/web/client/sessions.ts +372 -0
- package/src/web/client/settingsModal.js +191 -0
- package/src/web/client/settingsModal.ts +176 -0
- package/src/web/client/state.js +250 -0
- package/src/web/client/state.ts +233 -0
- package/src/web/client/streamSmoother.js +127 -0
- package/src/web/client/streamSmoother.ts +119 -0
- package/src/web/client/studioLayout.js +54 -0
- package/src/web/client/studioLayout.ts +60 -0
- package/src/web/client/studioShell.js +327 -0
- package/src/web/client/studioShell.ts +340 -0
- package/src/web/client/studioStart.js +77 -0
- package/src/web/client/studioStart.ts +89 -0
- package/src/web/client/terminalPanel.js +357 -0
- package/src/web/client/terminalPanel.ts +345 -0
- package/src/web/client/turnView.js +934 -0
- package/src/web/client/turnView.ts +981 -0
- package/src/web/client/types.js +1 -0
- package/src/web/client/types.ts +319 -0
- package/src/web/client/validators.js +106 -0
- package/src/web/client/validators.ts +96 -0
- package/src/web/server/activeRuns.js +152 -0
- package/src/web/server/activeRuns.ts +171 -0
- package/src/web/server/routesBrowser.js +355 -0
- package/src/web/server/routesBrowser.ts +386 -0
- package/src/web/server/routesChat.js +304 -0
- package/src/web/server/routesChat.ts +347 -0
- package/src/web/server/routesCore.js +472 -0
- package/src/web/server/routesCore.ts +522 -0
- package/src/web/server/routesTerminal.js +162 -0
- package/src/web/server/routesTerminal.ts +182 -0
- package/src/web/server/routesWorkspace.js +510 -0
- package/src/web/server/routesWorkspace.ts +546 -0
- package/src/web/server/security.js +98 -0
- package/src/web/server/security.ts +108 -0
- package/src/web/server/sessionTranscript.js +586 -0
- package/src/web/server/sessionTranscript.ts +566 -0
- package/src/web/server/staticAssets.js +80 -0
- package/src/web/server/staticAssets.ts +91 -0
- package/src/web/server/types.js +1 -0
- package/src/web/server/types.ts +135 -0
- package/src/web/server/workspaceFiles.js +368 -0
- package/src/web/server/workspaceFiles.ts +363 -0
- package/src/web/skybridgeServer.js +76 -2449
- package/src/web/skybridgeServer.ts +118 -2600
- package/src/web/skybridgeUi.js +16 -450
- package/src/web/skybridgeUi.ts +16 -454
- package/src/web/styles/agent.css +380 -0
- package/src/web/styles/composer.css +193 -0
- package/src/web/styles/overlays.css +436 -0
- package/src/web/styles/shell.css +387 -0
- package/src/web/styles/studio.css +723 -0
- package/src/web/styles/thread.css +221 -0
- package/src/web/styles/tokens.css +94 -0
- package/src/web/ui/brandMark.js +73 -0
- package/src/web/ui/brandMark.ts +82 -0
- package/src/web/ui/modalsTemplate.js +139 -0
- package/src/web/ui/modalsTemplate.ts +139 -0
- package/src/web/ui/sidebarTemplate.js +63 -0
- package/src/web/ui/sidebarTemplate.ts +64 -0
- package/src/web/ui/studioTemplate.js +258 -0
- package/src/web/ui/studioTemplate.ts +258 -0
- package/src/web/ui/workspaceTemplate.js +72 -0
- package/src/web/ui/workspaceTemplate.ts +73 -0
- package/src/worktreeManager.js +16 -1
- package/src/worktreeManager.ts +22 -1
- package/src/web/skybridgeClientScript.js +0 -3951
- package/src/web/skybridgeClientScript.ts +0 -3952
- package/src/web/skybridgeStyles.js +0 -827
- package/src/web/skybridgeStyles.ts +0 -828
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/* Conversation Thread, Motion System, Markdown Prose & Code Cards */
|
|
2
|
+
@keyframes df-body-fade-in { 0% { opacity: 0.01; } to { opacity: 1; } }
|
|
3
|
+
@keyframes cds-morph-in { 0% { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
|
|
4
|
+
@keyframes fade-in-text { 0% { opacity: 0; } to { opacity: 1; } }
|
|
5
|
+
@keyframes timeline-block-enter {
|
|
6
|
+
0% { opacity: 0; filter: blur(3px); transform: translateY(4px) scale(0.97); }
|
|
7
|
+
100% { opacity: 1; filter: none; transform: none; }
|
|
8
|
+
}
|
|
9
|
+
@keyframes dframe-clay-breathe {
|
|
10
|
+
0%, 100% { opacity: 0.55; transform: scale(0.84); }
|
|
11
|
+
50% { opacity: 1; transform: scale(1.04); }
|
|
12
|
+
}
|
|
13
|
+
@keyframes dframe-dot-pulse {
|
|
14
|
+
0%, 100% { opacity: 0.35; }
|
|
15
|
+
45% { opacity: 1; }
|
|
16
|
+
}
|
|
17
|
+
@keyframes thinking-shimmer {
|
|
18
|
+
0% { background-position: 180% 0; }
|
|
19
|
+
100% { background-position: -180% 0; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.thread-wrap {
|
|
23
|
+
flex: 1;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow-y: auto;
|
|
27
|
+
padding: 14px 20px 44px;
|
|
28
|
+
scroll-behavior: auto;
|
|
29
|
+
}
|
|
30
|
+
.thread {
|
|
31
|
+
width: 100%;
|
|
32
|
+
max-width: var(--thread-w);
|
|
33
|
+
margin: 0 auto;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 24px;
|
|
37
|
+
}
|
|
38
|
+
.thread.chat-fade-in { animation: df-body-fade-in 0.22s ease-out; }
|
|
39
|
+
.turn { display: flex; flex-direction: column; gap: 8px; }
|
|
40
|
+
.turn.turn-enter { animation: cds-morph-in 0.22s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
|
|
41
|
+
.turn.user { align-items: flex-end; }
|
|
42
|
+
.user-bubble {
|
|
43
|
+
max-width: 78%;
|
|
44
|
+
background: var(--surface-2);
|
|
45
|
+
color: var(--text);
|
|
46
|
+
padding: 10px 16px;
|
|
47
|
+
border-radius: 20px;
|
|
48
|
+
white-space: pre-wrap;
|
|
49
|
+
word-break: break-word;
|
|
50
|
+
font-size: 14.5px;
|
|
51
|
+
line-height: 1.55;
|
|
52
|
+
}
|
|
53
|
+
.user-actions { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity 0.14s ease; }
|
|
54
|
+
.turn.user:hover .user-actions, .turn.user:focus-within .user-actions { opacity: 1; }
|
|
55
|
+
.thread-spacer { width: 100%; flex-shrink: 0; pointer-events: none; transition: height 0.12s ease-out; }
|
|
56
|
+
.attach-line { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
|
|
57
|
+
.attach-tag {
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
padding: 2px 9px;
|
|
60
|
+
border-radius: 6px;
|
|
61
|
+
background: var(--surface);
|
|
62
|
+
border: 1px solid var(--border);
|
|
63
|
+
color: var(--text-2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.assistant-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; }
|
|
67
|
+
.assistant-avatar {
|
|
68
|
+
width: 28px;
|
|
69
|
+
height: 28px;
|
|
70
|
+
border-radius: 50%;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: 1px solid transparent;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
margin-top: 1px;
|
|
78
|
+
transition: border-color 0.2s ease, opacity 0.2s ease;
|
|
79
|
+
}
|
|
80
|
+
.assistant-avatar svg { width: 22px; height: 22px; }
|
|
81
|
+
.turn-live-row {
|
|
82
|
+
display: none;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 9px;
|
|
85
|
+
padding: 6px 2px 2px;
|
|
86
|
+
color: var(--text-2);
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: 1.3;
|
|
89
|
+
}
|
|
90
|
+
.turn-live-row.is-active { display: inline-flex; animation: cds-morph-in 0.2s ease-out; }
|
|
91
|
+
.turn-live-mark {
|
|
92
|
+
width: 20px;
|
|
93
|
+
height: 20px;
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
}
|
|
99
|
+
.turn-live-mark svg { width: 20px; height: 20px; }
|
|
100
|
+
.turn-live-label {
|
|
101
|
+
font-size: 13px;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
letter-spacing: -0.01em;
|
|
104
|
+
background: linear-gradient(90deg, var(--text-dim) 0%, var(--text) 45%, #ABDB5F 55%, var(--text-dim) 100%);
|
|
105
|
+
background-size: 220% 100%;
|
|
106
|
+
-webkit-background-clip: text;
|
|
107
|
+
background-clip: text;
|
|
108
|
+
color: transparent;
|
|
109
|
+
animation: thinking-shimmer 2.4s linear infinite;
|
|
110
|
+
}
|
|
111
|
+
:root[data-theme="light"] .turn-live-label {
|
|
112
|
+
background: linear-gradient(90deg, #646b62 0%, #141714 45%, #55821a 55%, #646b62 100%);
|
|
113
|
+
background-size: 220% 100%;
|
|
114
|
+
-webkit-background-clip: text;
|
|
115
|
+
background-clip: text;
|
|
116
|
+
color: transparent;
|
|
117
|
+
}
|
|
118
|
+
.assistant-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
119
|
+
.assistant-col > :empty { display: none !important; }
|
|
120
|
+
.assistant-prose { color: var(--text); font-size: 15px; line-height: 1.68; word-break: break-word; }
|
|
121
|
+
.assistant-prose > * { contain: layout; }
|
|
122
|
+
.assistant-prose > .md-table-wrap { contain: none; }
|
|
123
|
+
.assistant-prose p { margin: 0 0 12px; }
|
|
124
|
+
.assistant-prose p:last-child { margin-bottom: 0; }
|
|
125
|
+
.assistant-prose h1, .assistant-prose h2, .assistant-prose h3, .assistant-prose h4 {
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
margin: 16px 0 8px;
|
|
128
|
+
line-height: 1.3;
|
|
129
|
+
color: var(--text);
|
|
130
|
+
}
|
|
131
|
+
.assistant-prose h1 { font-size: 1.32em; }
|
|
132
|
+
.assistant-prose h2 { font-size: 1.18em; }
|
|
133
|
+
.assistant-prose h3 { font-size: 1.06em; }
|
|
134
|
+
.assistant-prose ul, .assistant-prose ol { margin: 0 0 12px; padding-left: 22px; }
|
|
135
|
+
.assistant-prose li { margin: 4px 0; }
|
|
136
|
+
.assistant-prose blockquote {
|
|
137
|
+
margin: 10px 0;
|
|
138
|
+
padding: 6px 14px;
|
|
139
|
+
border-left: 2px solid var(--border-strong);
|
|
140
|
+
color: var(--text-2);
|
|
141
|
+
}
|
|
142
|
+
.assistant-prose hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
|
|
143
|
+
.assistant-prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }
|
|
144
|
+
.assistant-prose code.inline-code {
|
|
145
|
+
font: 0.88em var(--font-mono);
|
|
146
|
+
padding: 2px 5px;
|
|
147
|
+
border-radius: 5px;
|
|
148
|
+
background: var(--surface-2);
|
|
149
|
+
}
|
|
150
|
+
.md-file-chip {
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
gap: 5px;
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
padding: 1px 7px;
|
|
156
|
+
margin: 0 1px;
|
|
157
|
+
border-radius: 6px;
|
|
158
|
+
border: 1px solid var(--border);
|
|
159
|
+
background: var(--surface);
|
|
160
|
+
color: var(--text);
|
|
161
|
+
font: 12.5px/1.45 var(--font-mono);
|
|
162
|
+
vertical-align: baseline;
|
|
163
|
+
transition: background 0.14s ease, border-color 0.14s ease;
|
|
164
|
+
}
|
|
165
|
+
.md-file-chip:hover { background: var(--surface-2); border-color: var(--border-strong); }
|
|
166
|
+
.md-file-chip.is-static { cursor: default; color: var(--text-2); }
|
|
167
|
+
.md-file-chip svg {
|
|
168
|
+
width: 12px;
|
|
169
|
+
height: 12px;
|
|
170
|
+
stroke: var(--text-dim);
|
|
171
|
+
fill: none;
|
|
172
|
+
stroke-width: 1.8;
|
|
173
|
+
stroke-linecap: round;
|
|
174
|
+
stroke-linejoin: round;
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
}
|
|
177
|
+
.md-file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
178
|
+
.md-file-chip-line { color: var(--text-dim); font-size: 11.5px; flex-shrink: 0; }
|
|
179
|
+
.stream-fade { animation: fade-in-text 0.15s linear backwards; }
|
|
180
|
+
.md-table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; }
|
|
181
|
+
.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; word-break: normal; }
|
|
182
|
+
.md-table th, .md-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
|
|
183
|
+
.md-table th { background: var(--surface); font-weight: 500; color: var(--text); white-space: nowrap; }
|
|
184
|
+
.md-table tr:last-child td { border-bottom: none; }
|
|
185
|
+
|
|
186
|
+
/* Code Block Chrome */
|
|
187
|
+
.code-card {
|
|
188
|
+
margin: 12px 0;
|
|
189
|
+
border: 1px solid var(--border);
|
|
190
|
+
border-radius: 10px;
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
background: #0d0f0d;
|
|
193
|
+
}
|
|
194
|
+
:root[data-theme="light"] .code-card { background: #191d18; color: #ecefe9; }
|
|
195
|
+
.code-head {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
justify-content: space-between;
|
|
199
|
+
padding: 7px 12px;
|
|
200
|
+
background: rgba(255, 255, 255, 0.03);
|
|
201
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
|
202
|
+
font-size: 12px;
|
|
203
|
+
color: #a0a79c;
|
|
204
|
+
}
|
|
205
|
+
.code-head-actions { display: inline-flex; gap: 4px; }
|
|
206
|
+
.code-btn {
|
|
207
|
+
border: none;
|
|
208
|
+
background: transparent;
|
|
209
|
+
color: #c4cbc0;
|
|
210
|
+
border-radius: 6px;
|
|
211
|
+
padding: 3px 8px;
|
|
212
|
+
font-size: 12px;
|
|
213
|
+
}
|
|
214
|
+
.code-btn:hover { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
|
|
215
|
+
.code-pre {
|
|
216
|
+
margin: 0;
|
|
217
|
+
padding: 13px 14px;
|
|
218
|
+
overflow-x: auto;
|
|
219
|
+
font: 12.8px/1.55 var(--font-mono);
|
|
220
|
+
color: #e4e8e0;
|
|
221
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Causyne Web Interface — Theme Tokens, Typography & Global Base */
|
|
2
|
+
:root {
|
|
3
|
+
--bg: #141714;
|
|
4
|
+
--sidebar-bg: #101310;
|
|
5
|
+
--surface: #1b1f1b;
|
|
6
|
+
--surface-2: #232823;
|
|
7
|
+
--surface-3: #2c322c;
|
|
8
|
+
--popover-bg: #1c201c;
|
|
9
|
+
--border: rgba(255, 255, 255, 0.08);
|
|
10
|
+
--border-strong: rgba(255, 255, 255, 0.14);
|
|
11
|
+
--text: #ecefe9;
|
|
12
|
+
--text-2: #a0a79c;
|
|
13
|
+
--text-dim: #70776c;
|
|
14
|
+
--lime: #B5D66A;
|
|
15
|
+
--lime-hover: #c5e37e;
|
|
16
|
+
--lime-ink: #12170c;
|
|
17
|
+
--lime-soft: rgba(181, 214, 106, 0.10);
|
|
18
|
+
--ok: #68c98a;
|
|
19
|
+
--warn: #e5b85c;
|
|
20
|
+
--err: #e57373;
|
|
21
|
+
--diff-add-bg: rgba(104, 201, 138, 0.11);
|
|
22
|
+
--diff-del-bg: rgba(229, 115, 115, 0.12);
|
|
23
|
+
--shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
|
|
24
|
+
--font-display: "Exo 2", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
25
|
+
--font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
26
|
+
--font-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, monospace;
|
|
27
|
+
--sidebar-w: 256px;
|
|
28
|
+
--studio-w: 480px;
|
|
29
|
+
--thread-w: 740px;
|
|
30
|
+
--composer-w: 700px;
|
|
31
|
+
--topbar-h: 52px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:root[data-theme="light"] {
|
|
35
|
+
--bg: #ffffff;
|
|
36
|
+
--sidebar-bg: #f6f7f5;
|
|
37
|
+
--surface: #f4f5f2;
|
|
38
|
+
--surface-2: #eaede8;
|
|
39
|
+
--surface-3: #dfe3dc;
|
|
40
|
+
--popover-bg: #ffffff;
|
|
41
|
+
--border: rgba(20, 23, 20, 0.08);
|
|
42
|
+
--border-strong: rgba(20, 23, 20, 0.15);
|
|
43
|
+
--text: #181b17;
|
|
44
|
+
--text-2: #52594f;
|
|
45
|
+
--text-dim: #7b8277;
|
|
46
|
+
--lime: #4c7417;
|
|
47
|
+
--lime-hover: #3d6011;
|
|
48
|
+
--lime-ink: #ffffff;
|
|
49
|
+
--lime-soft: rgba(76, 116, 23, 0.09);
|
|
50
|
+
--ok: #1f8a4c;
|
|
51
|
+
--warn: #b2780c;
|
|
52
|
+
--err: #c93b3b;
|
|
53
|
+
--diff-add-bg: rgba(31, 138, 76, 0.09);
|
|
54
|
+
--diff-del-bg: rgba(201, 59, 59, 0.09);
|
|
55
|
+
--shadow: 0 10px 26px rgba(18, 24, 16, 0.10);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
59
|
+
|
|
60
|
+
html, body {
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
height: 100%;
|
|
64
|
+
background: var(--bg);
|
|
65
|
+
color: var(--text);
|
|
66
|
+
font: 14px/1.55 var(--font-sans);
|
|
67
|
+
-webkit-font-smoothing: antialiased;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
::selection { background: var(--lime); color: var(--lime-ink); }
|
|
72
|
+
button, input, textarea, select { font: inherit; color: inherit; }
|
|
73
|
+
button { cursor: pointer; }
|
|
74
|
+
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
|
|
75
|
+
outline: 1.5px solid var(--border-strong);
|
|
76
|
+
outline-offset: 1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
|
|
80
|
+
*::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
81
|
+
*::-webkit-scrollbar-track { background: transparent; }
|
|
82
|
+
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
|
|
83
|
+
*::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
|
|
84
|
+
|
|
85
|
+
.sr-only {
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: 1px;
|
|
88
|
+
height: 1px;
|
|
89
|
+
padding: 0;
|
|
90
|
+
margin: -1px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
clip: rect(0, 0, 0, 0);
|
|
93
|
+
border: 0;
|
|
94
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const CAUSYNE_BLADE_PATHS = [
|
|
2
|
+
{
|
|
3
|
+
cls: 'b1',
|
|
4
|
+
fill: '#ABDB5F',
|
|
5
|
+
d: 'M 682.32,144.33 A 29.64,29.64 0 0 1 723.52,132.42 L 1071.15,334.84 A 31.71,31.71 0 0 1 1058.12,393.82 L 542.17,441.63 A 8.50,8.50 0 0 1 533.85,429.23 Z'
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
cls: 'b2',
|
|
9
|
+
fill: '#383D45',
|
|
10
|
+
d: 'M 1104.54,837.92 A 39.43,39.43 0 0 1 1033.41,861.10 L 741.14,466.14 A 14.97,14.97 0 0 1 751.86,442.32 L 1066.59,414.57 A 37.43,37.43 0 0 1 1107.30,452.12 Z'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
cls: 'b3',
|
|
14
|
+
fill: '#383D45',
|
|
15
|
+
d: 'M 828.50,645.61 A 8.50,8.50 0 0 1 842.76,644.60 L 1029.91,895.29 A 32.64,32.64 0 0 1 1019.14,943.60 L 647.88,1141.98 A 43.37,43.37 0 0 1 589.39,1082.93 Z'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
cls: 'b4',
|
|
19
|
+
fill: '#383D45',
|
|
20
|
+
d: 'M 553.56,1101.63 A 30.36,30.36 0 0 1 510.70,1112.54 L 183.70,904.44 A 38.88,38.88 0 0 1 201.08,832.92 L 696.78,788.28 A 16.97,16.97 0 0 1 713.14,813.39 Z'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
cls: 'b5',
|
|
24
|
+
fill: '#383D45',
|
|
25
|
+
d: 'M 510.57,758.90 A 13.28,13.28 0 0 1 501.43,780.14 L 179.80,814.91 A 30.67,30.67 0 0 1 145.84,784.23 L 148.24,400.27 A 39.69,39.69 0 0 1 219.51,376.48 Z'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
cls: 'b6',
|
|
29
|
+
fill: '#383D45',
|
|
30
|
+
d: 'M 426.44,590.45 A 8.50,8.50 0 0 1 412.13,591.67 L 218.19,336.46 A 28.65,28.65 0 0 1 227.41,293.90 L 598.25,93.95 A 41.84,41.84 0 0 1 655.24,150.07 Z'
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
export function escapeHtmlAttr(value) {
|
|
34
|
+
return value
|
|
35
|
+
.replace(/&/g, '&')
|
|
36
|
+
.replace(/</g, '<')
|
|
37
|
+
.replace(/>/g, '>')
|
|
38
|
+
.replace(/"/g, '"')
|
|
39
|
+
.replace(/'/g, ''');
|
|
40
|
+
}
|
|
41
|
+
export function getCausyneFaviconSvg() {
|
|
42
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => ` <path d="${b.d}"/>`).join('\n');
|
|
43
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => ` <path fill="${b.fill}" d="${b.d}"/>`).join('\n');
|
|
44
|
+
return [
|
|
45
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1254 1254" width="1254" height="1254">',
|
|
46
|
+
' <title>Causyne</title>',
|
|
47
|
+
' <g fill="none" stroke="#FFFFFF" stroke-width="16" stroke-linejoin="round" stroke-linecap="round">',
|
|
48
|
+
outlines,
|
|
49
|
+
' </g>',
|
|
50
|
+
' <g>',
|
|
51
|
+
fills,
|
|
52
|
+
' </g>',
|
|
53
|
+
'</svg>'
|
|
54
|
+
].join('\n');
|
|
55
|
+
}
|
|
56
|
+
export function renderCausyneMarkSvg(idAttr, extraClass) {
|
|
57
|
+
const idPart = idAttr ? ` id="${idAttr}"` : '';
|
|
58
|
+
const cls = extraClass ? `brand-mark causyne-aperture ${extraClass}` : 'brand-mark causyne-aperture';
|
|
59
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => `<path d="${b.d}"/>`).join('');
|
|
60
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => `<path class="causyne-blade ${b.cls}" fill="${b.fill}" d="${b.d}"/>`).join('');
|
|
61
|
+
return [
|
|
62
|
+
`<svg${idPart} class="${cls}" viewBox="0 0 1254 1254" aria-hidden="true">`,
|
|
63
|
+
'<g class="causyne-rotor">',
|
|
64
|
+
'<g class="causyne-outline" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linejoin="round" stroke-linecap="round">',
|
|
65
|
+
outlines,
|
|
66
|
+
'</g>',
|
|
67
|
+
'<g class="causyne-blades">',
|
|
68
|
+
fills,
|
|
69
|
+
'</g>',
|
|
70
|
+
'</g>',
|
|
71
|
+
'</svg>'
|
|
72
|
+
].join('\n');
|
|
73
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export interface CausyneBladePath {
|
|
2
|
+
readonly cls: string;
|
|
3
|
+
readonly fill: string;
|
|
4
|
+
readonly d: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const CAUSYNE_BLADE_PATHS: readonly CausyneBladePath[] = [
|
|
8
|
+
{
|
|
9
|
+
cls: 'b1',
|
|
10
|
+
fill: '#ABDB5F',
|
|
11
|
+
d: 'M 682.32,144.33 A 29.64,29.64 0 0 1 723.52,132.42 L 1071.15,334.84 A 31.71,31.71 0 0 1 1058.12,393.82 L 542.17,441.63 A 8.50,8.50 0 0 1 533.85,429.23 Z'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
cls: 'b2',
|
|
15
|
+
fill: '#383D45',
|
|
16
|
+
d: 'M 1104.54,837.92 A 39.43,39.43 0 0 1 1033.41,861.10 L 741.14,466.14 A 14.97,14.97 0 0 1 751.86,442.32 L 1066.59,414.57 A 37.43,37.43 0 0 1 1107.30,452.12 Z'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
cls: 'b3',
|
|
20
|
+
fill: '#383D45',
|
|
21
|
+
d: 'M 828.50,645.61 A 8.50,8.50 0 0 1 842.76,644.60 L 1029.91,895.29 A 32.64,32.64 0 0 1 1019.14,943.60 L 647.88,1141.98 A 43.37,43.37 0 0 1 589.39,1082.93 Z'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
cls: 'b4',
|
|
25
|
+
fill: '#383D45',
|
|
26
|
+
d: 'M 553.56,1101.63 A 30.36,30.36 0 0 1 510.70,1112.54 L 183.70,904.44 A 38.88,38.88 0 0 1 201.08,832.92 L 696.78,788.28 A 16.97,16.97 0 0 1 713.14,813.39 Z'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
cls: 'b5',
|
|
30
|
+
fill: '#383D45',
|
|
31
|
+
d: 'M 510.57,758.90 A 13.28,13.28 0 0 1 501.43,780.14 L 179.80,814.91 A 30.67,30.67 0 0 1 145.84,784.23 L 148.24,400.27 A 39.69,39.69 0 0 1 219.51,376.48 Z'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
cls: 'b6',
|
|
35
|
+
fill: '#383D45',
|
|
36
|
+
d: 'M 426.44,590.45 A 8.50,8.50 0 0 1 412.13,591.67 L 218.19,336.46 A 28.65,28.65 0 0 1 227.41,293.90 L 598.25,93.95 A 41.84,41.84 0 0 1 655.24,150.07 Z'
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export function escapeHtmlAttr(value: string): string {
|
|
41
|
+
return value
|
|
42
|
+
.replace(/&/g, '&')
|
|
43
|
+
.replace(/</g, '<')
|
|
44
|
+
.replace(/>/g, '>')
|
|
45
|
+
.replace(/"/g, '"')
|
|
46
|
+
.replace(/'/g, ''');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function getCausyneFaviconSvg(): string {
|
|
50
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => ` <path d="${b.d}"/>`).join('\n');
|
|
51
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => ` <path fill="${b.fill}" d="${b.d}"/>`).join('\n');
|
|
52
|
+
return [
|
|
53
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1254 1254" width="1254" height="1254">',
|
|
54
|
+
' <title>Causyne</title>',
|
|
55
|
+
' <g fill="none" stroke="#FFFFFF" stroke-width="16" stroke-linejoin="round" stroke-linecap="round">',
|
|
56
|
+
outlines,
|
|
57
|
+
' </g>',
|
|
58
|
+
' <g>',
|
|
59
|
+
fills,
|
|
60
|
+
' </g>',
|
|
61
|
+
'</svg>'
|
|
62
|
+
].join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function renderCausyneMarkSvg(idAttr?: string, extraClass?: string): string {
|
|
66
|
+
const idPart = idAttr ? ` id="${idAttr}"` : '';
|
|
67
|
+
const cls = extraClass ? `brand-mark causyne-aperture ${extraClass}` : 'brand-mark causyne-aperture';
|
|
68
|
+
const outlines = CAUSYNE_BLADE_PATHS.map((b) => `<path d="${b.d}"/>`).join('');
|
|
69
|
+
const fills = CAUSYNE_BLADE_PATHS.map((b) => `<path class="causyne-blade ${b.cls}" fill="${b.fill}" d="${b.d}"/>`).join('');
|
|
70
|
+
return [
|
|
71
|
+
`<svg${idPart} class="${cls}" viewBox="0 0 1254 1254" aria-hidden="true">`,
|
|
72
|
+
'<g class="causyne-rotor">',
|
|
73
|
+
'<g class="causyne-outline" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linejoin="round" stroke-linecap="round">',
|
|
74
|
+
outlines,
|
|
75
|
+
'</g>',
|
|
76
|
+
'<g class="causyne-blades">',
|
|
77
|
+
fills,
|
|
78
|
+
'</g>',
|
|
79
|
+
'</g>',
|
|
80
|
+
'</svg>'
|
|
81
|
+
].join('\n');
|
|
82
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export function renderModalsHtml() {
|
|
2
|
+
return [
|
|
3
|
+
'<div id="model-popover" class="popover model-popover" role="dialog" aria-label="Select model"></div>',
|
|
4
|
+
'<div id="browser-more-popover" class="popover" role="menu" aria-label="Browser options">',
|
|
5
|
+
' <div class="pop-section">Mode</div>',
|
|
6
|
+
' <button id="bmode-agent-btn" class="pop-item active" type="button"><span>Live browser</span><span class="pop-sub">Shared</span></button>',
|
|
7
|
+
' <button id="bmode-frame-btn" class="pop-item" type="button"><span>Local HTML preview</span><span class="pop-sub">Static</span></button>',
|
|
8
|
+
' <div class="pop-divider"></div>',
|
|
9
|
+
' <div class="pop-row">',
|
|
10
|
+
' <span>Engine</span>',
|
|
11
|
+
' <select id="browser-engine-select" class="pop-select" aria-label="Browser engine">',
|
|
12
|
+
' <option value="auto">Auto</option>',
|
|
13
|
+
' <option value="camoufox">Camoufox</option>',
|
|
14
|
+
' <option value="chromium">Chromium</option>',
|
|
15
|
+
' </select>',
|
|
16
|
+
' </div>',
|
|
17
|
+
' <div class="pop-row">',
|
|
18
|
+
' <span>Viewport</span>',
|
|
19
|
+
' <div class="seg-group" role="group" aria-label="Viewport size">',
|
|
20
|
+
' <button class="seg-btn active" data-vp="desktop" type="button">Desktop</button>',
|
|
21
|
+
' <button class="seg-btn" data-vp="tablet" type="button">Tablet</button>',
|
|
22
|
+
' <button class="seg-btn" data-vp="mobile" type="button">Mobile</button>',
|
|
23
|
+
' </div>',
|
|
24
|
+
' </div>',
|
|
25
|
+
' <div class="pop-divider"></div>',
|
|
26
|
+
' <button id="browser-handoff-btn" class="pop-item" type="button"><span>Let Causyne browse</span></button>',
|
|
27
|
+
' <button id="browser-snapshot-btn" class="pop-item" type="button"><span>Inspect page structure</span></button>',
|
|
28
|
+
' <button id="browser-demo-btn" class="pop-item" type="button"><span>Preview open document</span></button>',
|
|
29
|
+
' <button id="browser-open-ext-btn" class="pop-item" type="button" style="display:none"><span>Open in external tab</span></button>',
|
|
30
|
+
' <div class="pop-divider"></div>',
|
|
31
|
+
' <button id="browser-close-engine-btn" class="pop-item" type="button" style="color:var(--err)"><span>Close browser</span></button>',
|
|
32
|
+
'</div>',
|
|
33
|
+
'<div id="plus-popover" class="popover" role="menu" aria-label="Add to message">',
|
|
34
|
+
' <div class="pop-section">Workspace</div>',
|
|
35
|
+
' <button id="plus-attach-file" class="pop-item" type="button"><span>Attach file</span><span class="pop-sub">@file</span></button>',
|
|
36
|
+
' <button id="plus-new-idoc" class="pop-item" type="button"><span>New document</span><span class="pop-sub">Editor</span></button>',
|
|
37
|
+
' <button id="plus-open-browser" class="pop-item" type="button"><span>Open browser</span><span class="pop-sub">Browser</span></button>',
|
|
38
|
+
' <button id="plus-open-diff" class="pop-item" type="button"><span>Review changes</span><span class="pop-sub">Changes</span></button>',
|
|
39
|
+
' <button id="plus-open-doctor" class="pop-item" type="button"><span>Run diagnostics</span><span class="pop-sub">/doctor</span></button>',
|
|
40
|
+
'</div>',
|
|
41
|
+
'<div id="perm-popover" class="popover perm-popover" role="menu" aria-label="Permission preset"></div>',
|
|
42
|
+
'<div id="perm-confirm-modal" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="perm-confirm-title">',
|
|
43
|
+
' <div class="modal-card perm-confirm-card">',
|
|
44
|
+
' <div class="modal-head">',
|
|
45
|
+
' <h2 id="perm-confirm-title" class="modal-title">Enable Full access?</h2>',
|
|
46
|
+
' <button id="perm-confirm-close" class="icon-btn" type="button" aria-label="Close confirmation">',
|
|
47
|
+
' <svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',
|
|
48
|
+
' </button>',
|
|
49
|
+
' </div>',
|
|
50
|
+
' <p id="perm-confirm-desc" class="perm-confirm-desc">Full access reduces confirmation steps and allows Causyne to edit workspace files and execute commands directly. Destructive command and credential safeguards remain enforced.</p>',
|
|
51
|
+
' <label class="perm-confirm-check-row">',
|
|
52
|
+
' <input id="perm-confirm-check" type="checkbox">',
|
|
53
|
+
' <span>I understand the risks and want to continue</span>',
|
|
54
|
+
' </label>',
|
|
55
|
+
' <div class="perm-confirm-actions">',
|
|
56
|
+
' <button id="perm-confirm-cancel" class="btn-ghost" type="button">Cancel</button>',
|
|
57
|
+
' <button id="perm-confirm-ok" class="btn-danger" type="button" disabled>Enable Full access</button>',
|
|
58
|
+
' </div>',
|
|
59
|
+
' </div>',
|
|
60
|
+
'</div>',
|
|
61
|
+
'<div id="settings-modal" class="modal-backdrop" role="dialog" aria-modal="true" aria-label="Settings">',
|
|
62
|
+
' <div class="modal-card">',
|
|
63
|
+
' <div class="modal-head">',
|
|
64
|
+
' <h2 class="modal-title">Settings</h2>',
|
|
65
|
+
' <button id="settings-close-btn" class="icon-btn" type="button" aria-label="Close settings">',
|
|
66
|
+
' <svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',
|
|
67
|
+
' </button>',
|
|
68
|
+
' </div>',
|
|
69
|
+
' <div class="setting-row">',
|
|
70
|
+
' <div><div class="setting-label">Theme</div><div class="setting-desc">Switch between dark and light appearance</div></div>',
|
|
71
|
+
' <button id="theme-toggle-btn" class="btn-ghost" type="button">Light</button>',
|
|
72
|
+
' </div>',
|
|
73
|
+
' <div class="setting-row">',
|
|
74
|
+
' <div><div class="setting-label">Permission</div><div class="setting-desc">Choose the default permission preset for new sessions</div></div>',
|
|
75
|
+
' <select id="settings-perm-select" class="pop-select" aria-label="Default permission preset">',
|
|
76
|
+
' <option value="read-only">Read Only</option>',
|
|
77
|
+
' <option value="workspace-write" selected>Workspace Write</option>',
|
|
78
|
+
' <option value="danger-full-access">Full access</option>',
|
|
79
|
+
' </select>',
|
|
80
|
+
' </div>',
|
|
81
|
+
' <div class="setting-row">',
|
|
82
|
+
' <div><div class="setting-label">Workspace</div><div id="settings-ws-path" class="setting-desc"></div></div>',
|
|
83
|
+
' <span class="pop-sub">Local only</span>',
|
|
84
|
+
' </div>',
|
|
85
|
+
' <div class="license-section">',
|
|
86
|
+
' <div class="license-head">',
|
|
87
|
+
' <div><div class="setting-label">Plan & Support</div><div id="license-summary" class="setting-desc">Checking plan status...</div></div>',
|
|
88
|
+
' <span id="license-badge" class="license-badge">Free</span>',
|
|
89
|
+
' </div>',
|
|
90
|
+
' <div id="license-meter-wrap" class="license-meter"><div id="license-meter-fill" class="license-meter-fill"></div></div>',
|
|
91
|
+
' <div id="license-support-note" class="license-support-note">Upgrade to Causyne Pro for unlimited daily usage and to support ongoing independent development for the Causyne community.</div>',
|
|
92
|
+
' <div class="vault-row">',
|
|
93
|
+
' <select id="license-plan-select" aria-label="Causyne plan">',
|
|
94
|
+
' <option value="monthly">Causyne Pro Monthly ($12/mo)</option>',
|
|
95
|
+
' <option value="annual">Causyne Pro Annual ($99/yr · Save 31%)</option>',
|
|
96
|
+
' <option value="two_month_pass">2-Month Pass ($22 one-time)</option>',
|
|
97
|
+
' <option value="two_year_pass">2-Year Pass ($179 one-time)</option>',
|
|
98
|
+
' </select>',
|
|
99
|
+
' <button id="license-upgrade-btn" class="btn-primary" type="button">Upgrade</button>',
|
|
100
|
+
' <button id="license-portal-btn" class="btn-ghost" type="button" style="display:none">Manage billing</button>',
|
|
101
|
+
' <button id="license-refresh-btn" class="btn-ghost" type="button">Refresh</button>',
|
|
102
|
+
' </div>',
|
|
103
|
+
' <div class="vault-row">',
|
|
104
|
+
' <input id="license-recovery-input" type="text" autocomplete="off" placeholder="Link recovery code (CSYN-XXXX-XXXX-XXXX-XXXX)">',
|
|
105
|
+
' <button id="license-recover-btn" class="btn-ghost" type="button">Link license</button>',
|
|
106
|
+
' </div>',
|
|
107
|
+
' <div id="license-status-msg" class="setting-desc"></div>',
|
|
108
|
+
' </div>',
|
|
109
|
+
' <div style="display:flex;flex-direction:column;gap:8px;padding:10px 0;border-bottom:1px solid var(--border)">',
|
|
110
|
+
' <div><div class="setting-label">API keys</div><div class="setting-desc">Stored encrypted on this device and never echoed back.</div></div>',
|
|
111
|
+
' <div class="vault-row">',
|
|
112
|
+
' <select id="vault-provider-select" aria-label="Provider">',
|
|
113
|
+
' <option value="deepseek">DeepSeek</option>',
|
|
114
|
+
' <option value="qwen">Qwen</option>',
|
|
115
|
+
' <option value="dashscope-byok">Alibaba DashScope</option>',
|
|
116
|
+
' <option value="anthropic">Anthropic</option>',
|
|
117
|
+
' <option value="openai">OpenAI</option>',
|
|
118
|
+
' <option value="gemini">Gemini</option>',
|
|
119
|
+
' <option value="moonshot">Moonshot</option>',
|
|
120
|
+
' <option value="xai">xAI</option>',
|
|
121
|
+
' <option value="openrouter">OpenRouter</option>',
|
|
122
|
+
' <option value="groq">Groq</option>',
|
|
123
|
+
' <option value="cerebras">Cerebras</option>',
|
|
124
|
+
' <option value="mistral">Mistral</option>',
|
|
125
|
+
' </select>',
|
|
126
|
+
' <input id="vault-key-input" type="password" autocomplete="off" placeholder="Paste API key">',
|
|
127
|
+
' <button id="vault-save-btn" class="btn-primary" type="button">Save key</button>',
|
|
128
|
+
' </div>',
|
|
129
|
+
' <div id="vault-status" class="setting-desc"></div>',
|
|
130
|
+
' </div>',
|
|
131
|
+
' <div class="setting-row" style="border-bottom:none; padding-bottom:0">',
|
|
132
|
+
' <div><div class="setting-label">Diagnostics</div><div class="setting-desc">Keys and tokens are automatically redacted.</div></div>',
|
|
133
|
+
' <button id="doctor-load-btn" class="btn-ghost" type="button">Refresh</button>',
|
|
134
|
+
' </div>',
|
|
135
|
+
' <pre id="doctor-pre" class="doctor-pre">Click Refresh to view diagnostics.</pre>',
|
|
136
|
+
' </div>',
|
|
137
|
+
'</div>'
|
|
138
|
+
].join('\n');
|
|
139
|
+
}
|