@leitwerk-dev/ui 0.1.0
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/dist/LICENSE +13 -0
- package/dist/assets/ChronicleMarkdown-BLgtHeEE.js +16 -0
- package/dist/assets/ChronicleMarkdown-D6hFzERy.css +1 -0
- package/dist/assets/FutureLaunchDetailPage-KrXSGzHM.js +1 -0
- package/dist/assets/FutureLaunchDetailPage-VPMBtpYc.css +1 -0
- package/dist/assets/GenericLauncher-Cv38FByt.js +1 -0
- package/dist/assets/GenericLauncher-D_GMtsQ5.css +1 -0
- package/dist/assets/HomePage-Cd3lEtwZ.js +1 -0
- package/dist/assets/HomePage-DYh_QHXv.css +1 -0
- package/dist/assets/PageHeader-6PdvYODN.css +1 -0
- package/dist/assets/PageHeader-D6pP4hIh.js +1 -0
- package/dist/assets/ProcessActionsMenu-1QySGNy9.js +1 -0
- package/dist/assets/ProcessActionsMenu-BT2r9vO8.css +1 -0
- package/dist/assets/ProcessDetailPage-BLuc7sjV.js +12 -0
- package/dist/assets/ProcessDetailPage-CSrjzajF.css +1 -0
- package/dist/assets/ProcessFlowDiagram-BAh_M_rb.js +2 -0
- package/dist/assets/ProcessFlowDiagram-Cz8wNicU.css +1 -0
- package/dist/assets/ProcessesPage-BcM38HMs.css +1 -0
- package/dist/assets/ProcessesPage-DtPweRU-.js +1 -0
- package/dist/assets/ScheduleDateTimePicker-CQGvY-Rc.js +1 -0
- package/dist/assets/ScheduleDateTimePicker-CadXN9z7.css +1 -0
- package/dist/assets/SkillsPage-B30FAFia.css +1 -0
- package/dist/assets/SkillsPage-bXuv0kEE.js +2 -0
- package/dist/assets/WatchersPage-DNyUsU1y.js +1 -0
- package/dist/assets/WatchersPage-Dnfi1zUK.css +1 -0
- package/dist/assets/api-CqECFdii.js +1 -0
- package/dist/assets/browser-storage-LbKCyf_w.js +1 -0
- package/dist/assets/dist-B7WNbObw.js +2 -0
- package/dist/assets/index-66T4Gmbl.css +1 -0
- package/dist/assets/index-C8qCggeq.js +7 -0
- package/dist/assets/index-client-BqF3_t3P.js +2 -0
- package/dist/assets/mermaid-render.worker-DAVgiVRG.js +6393 -0
- package/dist/assets/retry-config.svelte-DFKCJtCe.js +1 -0
- package/dist/assets/router.svelte-COr45o9R.js +1 -0
- package/dist/fonts/OFL-Public-Sans.txt +115 -0
- package/dist/fonts/OFL-Spectral.txt +93 -0
- package/dist/fonts/README.md +38 -0
- package/dist/fonts/fonts.css +85 -0
- package/dist/fonts/public-sans-latin-cd00287f.woff2 +0 -0
- package/dist/fonts/public-sans-latin-ext-d025d4ba.woff2 +0 -0
- package/dist/fonts/spectral-latin-89d48951.woff2 +0 -0
- package/dist/fonts/spectral-latin-b7578f14.woff2 +0 -0
- package/dist/fonts/spectral-latin-c4e0a00d.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-260738f4.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-ab18ac17.woff2 +0 -0
- package/dist/fonts/spectral-latin-ext-f58c1db3.woff2 +0 -0
- package/dist/index.html +32 -0
- package/package.json +47 -0
- package/src/App.svelte +257 -0
- package/src/chronicle/components/ChronicleActionSection.svelte +1035 -0
- package/src/chronicle/components/ChronicleExpandButton.svelte +70 -0
- package/src/chronicle/components/ChronicleFlow.svelte +289 -0
- package/src/chronicle/components/ChronicleLeafOutcomePlaceholder.svelte +44 -0
- package/src/chronicle/components/ChronicleLeafOutcomeRendererHost.svelte +408 -0
- package/src/chronicle/components/ChronicleLeafOutcomeSection.svelte +253 -0
- package/src/chronicle/components/ChronicleLiveChip.svelte +96 -0
- package/src/chronicle/components/ChronicleLiveTail.svelte +376 -0
- package/src/chronicle/components/ChronicleMarkdown.svelte +168 -0
- package/src/chronicle/components/ChronicleOperatorInputSection.svelte +41 -0
- package/src/chronicle/components/ChronicleProcessErrorSection.svelte +131 -0
- package/src/chronicle/components/ChroniclePromptSection.svelte +54 -0
- package/src/chronicle/components/ChronicleQuestionRequest.svelte +167 -0
- package/src/chronicle/components/ChronicleReasoningDetailsOverlay.svelte +893 -0
- package/src/chronicle/components/ChronicleRecoverySection.svelte +338 -0
- package/src/chronicle/components/ChronicleScheduledActionSection.svelte +192 -0
- package/src/chronicle/components/ChronicleSectionHeader.svelte +135 -0
- package/src/chronicle/components/ChronicleStartupRecoverySection.svelte +138 -0
- package/src/chronicle/components/ChronicleTerminalSummary.svelte +127 -0
- package/src/chronicle/components/ChronicleThinkingSection.svelte +191 -0
- package/src/chronicle/components/ChronicleThinkingText.svelte +46 -0
- package/src/chronicle/components/ChronicleToolCallItem.svelte +477 -0
- package/src/chronicle/components/ChronicleTurnCluster.svelte +325 -0
- package/src/chronicle/components/ChronicleTurnRail.svelte +584 -0
- package/src/chronicle/components/ChronicleUsageStats.svelte +107 -0
- package/src/chronicle/components/CompactActionComposer.svelte +417 -0
- package/src/chronicle/components/ModelProfileOptions.svelte +20 -0
- package/src/chronicle/components/ProviderOptionsEditor.svelte +171 -0
- package/src/chronicle/components/RecoveryModelControl.svelte +95 -0
- package/src/chronicle/lib/action-bindings.ts +90 -0
- package/src/chronicle/lib/action-model-display.ts +133 -0
- package/src/chronicle/lib/action-preview.ts +16 -0
- package/src/chronicle/lib/chronicle-projection.ts +1342 -0
- package/src/chronicle/lib/chronicle-selectable-items.ts +352 -0
- package/src/chronicle/lib/chronicle-view-model.ts +121 -0
- package/src/chronicle/lib/formatting.ts +18 -0
- package/src/chronicle/lib/leaf-outcome-loader.ts +214 -0
- package/src/chronicle/lib/leaf-outcome-runtime.ts +37 -0
- package/src/chronicle/lib/prompt-highlighting.ts +78 -0
- package/src/chronicle/lib/scroll-sync.ts +88 -0
- package/src/chronicle/lib/tool-call-summary.ts +64 -0
- package/src/components/BrowserUiExtensionIndicatorHost.svelte +34 -0
- package/src/components/ConversationTreeDiagram.svelte +393 -0
- package/src/components/FormFieldRenderer.svelte +359 -0
- package/src/components/GenericLauncher.svelte +1970 -0
- package/src/components/KeyboardShortcutsModal.svelte +52 -0
- package/src/components/ModalShell.svelte +105 -0
- package/src/components/PageHeader.svelte +146 -0
- package/src/components/ProcessActionsMenu.svelte +514 -0
- package/src/components/ProcessInfoOverlay.svelte +1229 -0
- package/src/components/ScheduleDateTimePicker.svelte +155 -0
- package/src/components/SkillSelector.svelte +45 -0
- package/src/components/ToastContainer.svelte +192 -0
- package/src/components/launcher-form-copy.ts +172 -0
- package/src/components/launcher-model-config.ts +263 -0
- package/src/components/launcher-schedule.ts +127 -0
- package/src/extension-ui-dev-server.ts +98 -0
- package/src/lib/api.ts +970 -0
- package/src/lib/beautiful-mermaid-elk-instance.ts +54 -0
- package/src/lib/browser-storage.ts +11 -0
- package/src/lib/cost-estimates.ts +41 -0
- package/src/lib/elk-bundled-worker.ts +41 -0
- package/src/lib/flow-layout.ts +326 -0
- package/src/lib/format.ts +96 -0
- package/src/lib/future-executions-logic.ts +12 -0
- package/src/lib/future-launch-detail.ts +145 -0
- package/src/lib/instance-tree-layout.ts +158 -0
- package/src/lib/keyboard-shortcuts-help.ts +20 -0
- package/src/lib/keyboard.ts +40 -0
- package/src/lib/launcher-recent-values.ts +68 -0
- package/src/lib/markdown.ts +94 -0
- package/src/lib/mermaid-render.worker.ts +36 -0
- package/src/lib/pi-stream.ts +3 -0
- package/src/lib/primary-path-detail.ts +337 -0
- package/src/lib/primary-path-replay.ts +27 -0
- package/src/lib/process-browser.ts +179 -0
- package/src/lib/process-initial-prompt.ts +7 -0
- package/src/lib/process-launch-notices.svelte.ts +25 -0
- package/src/lib/process-row-view.ts +60 -0
- package/src/lib/process-terminal-display.ts +17 -0
- package/src/lib/process-toast-focus.svelte.ts +18 -0
- package/src/lib/processes-logic.ts +2 -0
- package/src/lib/processes.svelte.ts +334 -0
- package/src/lib/request-guard.ts +20 -0
- package/src/lib/retry-config.svelte.ts +19 -0
- package/src/lib/rich-markdown-elements.ts +173 -0
- package/src/lib/router-logic.ts +190 -0
- package/src/lib/router.svelte.ts +56 -0
- package/src/lib/runtime-config.ts +96 -0
- package/src/lib/test-fixtures.ts +13 -0
- package/src/lib/toasts.svelte.ts +104 -0
- package/src/lib/tool-call-rendering.ts +66 -0
- package/src/lib/ui-extensions.svelte.ts +381 -0
- package/src/lib/usage-snapshot.ts +9 -0
- package/src/lib/ws-classifier.ts +80 -0
- package/src/lib/ws.svelte.ts +281 -0
- package/src/main.ts +8 -0
- package/src/pages/FutureLaunchDetailPage.svelte +479 -0
- package/src/pages/HomePage.svelte +306 -0
- package/src/pages/ProcessCard.svelte +99 -0
- package/src/pages/ProcessDetailPage.svelte +599 -0
- package/src/pages/ProcessFlowDiagram.svelte +696 -0
- package/src/pages/ProcessGallery.svelte +252 -0
- package/src/pages/ProcessesPage.svelte +994 -0
- package/src/pages/SkillsPage.svelte +665 -0
- package/src/pages/WatchersPage.svelte +330 -0
- package/src/pages/process-detail/OverlayFrame.svelte +58 -0
- package/src/pages/process-detail/ProcessDetailChronicle.svelte +460 -0
- package/src/pages/process-detail/ProcessDetailHeader.svelte +167 -0
- package/src/pages/process-detail/process-detail-action-drafts.svelte.ts +211 -0
- package/src/pages/process-detail/process-detail-actions.svelte.ts +548 -0
- package/src/pages/process-detail/process-detail-chronicle-dom.ts +102 -0
- package/src/pages/process-detail/process-detail-chronicle-scroll.svelte.ts +711 -0
- package/src/pages/process-detail/process-detail-mutations.svelte.ts +91 -0
- package/src/pages/process-detail/process-detail-view-model.ts +149 -0
- package/src/shell/AppShell.svelte +249 -0
- package/src/shell/RouteLoadBoundary.svelte +43 -0
- package/src/shell/Sidebar.svelte +1358 -0
- package/src/shell/test-fixtures/RouteLoadTestComponent.svelte +5 -0
- package/src/vite-env.d.ts +2 -0
- package/src/vite-server-config.ts +27 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ModelProfileOptionSummary } from "@leitwerk-dev/protocol";
|
|
3
|
+
import ProviderOptionsEditor from "./ProviderOptionsEditor.svelte";
|
|
4
|
+
import RecoveryModelControl from "./RecoveryModelControl.svelte";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
anchorId: string;
|
|
8
|
+
instanceId: string;
|
|
9
|
+
isFocused: boolean;
|
|
10
|
+
title: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
guidance?: string;
|
|
13
|
+
technicalDetail?: string | null;
|
|
14
|
+
turnRecordId: string;
|
|
15
|
+
canContinue: boolean;
|
|
16
|
+
continueBusy?: boolean;
|
|
17
|
+
continueError?: string | null;
|
|
18
|
+
continuePrompt?: string;
|
|
19
|
+
retryBusy?: boolean;
|
|
20
|
+
retryError?: string | null;
|
|
21
|
+
modelProfiles?: readonly ModelProfileOptionSummary[];
|
|
22
|
+
defaultModelProfileId?: string | null;
|
|
23
|
+
defaultProviderOptions?: Readonly<Record<string, string>>;
|
|
24
|
+
onContinue: (
|
|
25
|
+
prompt: string,
|
|
26
|
+
nextTurnModelProfileId?: string | null,
|
|
27
|
+
providerOptions?: Readonly<Record<string, string>>,
|
|
28
|
+
) => void;
|
|
29
|
+
onRetry: (
|
|
30
|
+
nextTurnModelProfileId?: string | null,
|
|
31
|
+
providerOptions?: Readonly<Record<string, string>>,
|
|
32
|
+
) => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let {
|
|
36
|
+
anchorId,
|
|
37
|
+
instanceId,
|
|
38
|
+
isFocused,
|
|
39
|
+
title,
|
|
40
|
+
summary,
|
|
41
|
+
guidance = "Review the latest attempt, then continue from the saved work or retry the step from the beginning.",
|
|
42
|
+
technicalDetail = null,
|
|
43
|
+
turnRecordId,
|
|
44
|
+
canContinue,
|
|
45
|
+
continueBusy = false,
|
|
46
|
+
continueError = null,
|
|
47
|
+
continuePrompt = "",
|
|
48
|
+
retryBusy = false,
|
|
49
|
+
retryError = null,
|
|
50
|
+
modelProfiles = [],
|
|
51
|
+
defaultModelProfileId = null,
|
|
52
|
+
defaultProviderOptions = {},
|
|
53
|
+
onContinue,
|
|
54
|
+
onRetry,
|
|
55
|
+
}: Props = $props();
|
|
56
|
+
|
|
57
|
+
let continuePromptDraft = $state((() => continuePrompt)());
|
|
58
|
+
let modelProfileDraft = $state((() => defaultModelProfileId ?? "")());
|
|
59
|
+
let providerOptionsDraft = $state<Record<string, string> | undefined>(undefined);
|
|
60
|
+
|
|
61
|
+
const controlsBusy = $derived(continueBusy || retryBusy);
|
|
62
|
+
const continuePromptValid = $derived(continuePromptDraft.trim().length > 0);
|
|
63
|
+
const selectedProfile = $derived(
|
|
64
|
+
modelProfiles.find((profile) => profile.id === modelProfileDraft) ?? null,
|
|
65
|
+
);
|
|
66
|
+
const selectedModelUsable = $derived(
|
|
67
|
+
selectedProfile === null ||
|
|
68
|
+
selectedProfile.availability === undefined ||
|
|
69
|
+
selectedProfile.availability === "available",
|
|
70
|
+
);
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<section
|
|
74
|
+
id={anchorId}
|
|
75
|
+
class="recovery-section chronicle-danger-panel"
|
|
76
|
+
class:is-focused={isFocused}
|
|
77
|
+
data-anchor-id={anchorId}
|
|
78
|
+
data-focused={isFocused ? "true" : "false"}
|
|
79
|
+
data-section="current-turn-recovery"
|
|
80
|
+
tabindex="-1"
|
|
81
|
+
>
|
|
82
|
+
<div class="recovery-header">
|
|
83
|
+
<div class="recovery-copy">
|
|
84
|
+
<p class="recovery-eyebrow chronicle-danger-eyebrow">Error</p>
|
|
85
|
+
<h3>{title}</h3>
|
|
86
|
+
<p class="recovery-summary">{summary}</p>
|
|
87
|
+
<p class="recovery-guidance">{guidance}</p>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
{#if technicalDetail}
|
|
91
|
+
<details class="recovery-detail chronicle-danger-detail">
|
|
92
|
+
<summary>Technical details</summary>
|
|
93
|
+
<pre>{technicalDetail}</pre>
|
|
94
|
+
</details>
|
|
95
|
+
{/if}
|
|
96
|
+
|
|
97
|
+
<div class="recovery-actions" role="group" aria-label="Recovery actions">
|
|
98
|
+
<RecoveryModelControl
|
|
99
|
+
{instanceId}
|
|
100
|
+
{modelProfiles}
|
|
101
|
+
defaultModelProfileId={defaultModelProfileId ?? null}
|
|
102
|
+
initialProviderOptions={defaultProviderOptions}
|
|
103
|
+
disabled={controlsBusy}
|
|
104
|
+
selectId={`recovery-model-${turnRecordId}`}
|
|
105
|
+
selectLabel="Model for the new attempt"
|
|
106
|
+
selectDataField="recovery-model"
|
|
107
|
+
onModelChange={(profileId, _usable) => {
|
|
108
|
+
modelProfileDraft = profileId ?? "";
|
|
109
|
+
}}
|
|
110
|
+
onProviderOptionsChange={(values) => (providerOptionsDraft = values ? { ...values } : undefined)}
|
|
111
|
+
/>
|
|
112
|
+
{#if canContinue}
|
|
113
|
+
<div class="continue-editor">
|
|
114
|
+
<label class="continue-label" for={`continue-prompt-${turnRecordId}`}>Message before continuing</label>
|
|
115
|
+
<textarea
|
|
116
|
+
id={`continue-prompt-${turnRecordId}`}
|
|
117
|
+
class="continue-textarea"
|
|
118
|
+
data-field="continue-prompt"
|
|
119
|
+
rows="4"
|
|
120
|
+
bind:value={continuePromptDraft}
|
|
121
|
+
disabled={controlsBusy}
|
|
122
|
+
></textarea>
|
|
123
|
+
<p class="continue-help">
|
|
124
|
+
Use the suggested message to continue from the saved work, or replace it with a specific instruction for the resumed run.
|
|
125
|
+
</p>
|
|
126
|
+
<button
|
|
127
|
+
type="button"
|
|
128
|
+
class="recovery-button"
|
|
129
|
+
data-action="continue-failed-turn"
|
|
130
|
+
data-turn-record-id={turnRecordId}
|
|
131
|
+
data-pressable="true"
|
|
132
|
+
disabled={controlsBusy || !continuePromptValid || !selectedModelUsable}
|
|
133
|
+
onclick={() =>
|
|
134
|
+
onContinue(
|
|
135
|
+
continuePromptDraft,
|
|
136
|
+
modelProfileDraft || undefined,
|
|
137
|
+
providerOptionsDraft,
|
|
138
|
+
)}
|
|
139
|
+
>
|
|
140
|
+
{continueBusy ? "Continuing…" : "Continue from saved work"}
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
{:else}
|
|
144
|
+
<p class="recovery-note" data-section="continue-unavailable">
|
|
145
|
+
Not enough saved progress is available to continue this attempt.
|
|
146
|
+
</p>
|
|
147
|
+
{/if}
|
|
148
|
+
|
|
149
|
+
<button
|
|
150
|
+
type="button"
|
|
151
|
+
class="recovery-button"
|
|
152
|
+
data-action="retry-failed-turn"
|
|
153
|
+
data-turn-record-id={turnRecordId}
|
|
154
|
+
data-pressable="true"
|
|
155
|
+
disabled={controlsBusy || !selectedModelUsable}
|
|
156
|
+
onclick={() => onRetry(modelProfileDraft || undefined, providerOptionsDraft)}
|
|
157
|
+
>
|
|
158
|
+
{retryBusy ? "Retrying…" : "Retry from beginning"}
|
|
159
|
+
</button>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
{#if continueError || retryError}
|
|
163
|
+
<div class="recovery-errors">
|
|
164
|
+
{#if continueError}
|
|
165
|
+
<p class="recovery-error" role="alert">{continueError}</p>
|
|
166
|
+
{/if}
|
|
167
|
+
{#if retryError}
|
|
168
|
+
<p class="recovery-error" role="alert">{retryError}</p>
|
|
169
|
+
{/if}
|
|
170
|
+
</div>
|
|
171
|
+
{/if}
|
|
172
|
+
</section>
|
|
173
|
+
|
|
174
|
+
<style>
|
|
175
|
+
.recovery-header,
|
|
176
|
+
.recovery-copy,
|
|
177
|
+
.recovery-errors {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
gap: 8px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.recovery-copy h3,
|
|
184
|
+
.recovery-summary,
|
|
185
|
+
.recovery-guidance,
|
|
186
|
+
.recovery-note,
|
|
187
|
+
.recovery-error {
|
|
188
|
+
margin: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.recovery-summary,
|
|
192
|
+
.recovery-guidance,
|
|
193
|
+
.continue-help {
|
|
194
|
+
max-width: 58ch;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.recovery-copy h3 {
|
|
198
|
+
font-size: var(--type-heading-sm);
|
|
199
|
+
line-height: 1.2;
|
|
200
|
+
color: var(--chronicle-text);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.recovery-summary {
|
|
204
|
+
font-size: 14px;
|
|
205
|
+
line-height: 1.5;
|
|
206
|
+
color: var(--chronicle-text);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.recovery-guidance,
|
|
210
|
+
.recovery-note {
|
|
211
|
+
font-size: 13px;
|
|
212
|
+
line-height: 1.5;
|
|
213
|
+
color: var(--chronicle-text-muted);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.recovery-detail {
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
color: var(--chronicle-text-muted);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.recovery-detail > summary {
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
font-weight: 600;
|
|
224
|
+
color: color-mix(in srgb, var(--chronicle-text-muted) 88%, var(--chronicle-text) 12%);
|
|
225
|
+
user-select: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.recovery-detail > summary:focus-visible {
|
|
229
|
+
outline: 2px solid color-mix(in srgb, var(--chronicle-danger) 60%, transparent);
|
|
230
|
+
outline-offset: 2px;
|
|
231
|
+
border-radius: 4px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.recovery-actions {
|
|
235
|
+
display: grid;
|
|
236
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
237
|
+
gap: 14px;
|
|
238
|
+
align-items: end;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.continue-editor {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
gap: 10px;
|
|
245
|
+
min-width: 0;
|
|
246
|
+
padding: var(--space-md);
|
|
247
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-danger) 24%, var(--chronicle-border) 76%);
|
|
248
|
+
border-radius: var(--radius-lg);
|
|
249
|
+
background: color-mix(in srgb, white 92%, var(--chronicle-danger) 8%);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.continue-label {
|
|
253
|
+
font-size: 13px;
|
|
254
|
+
font-weight: 750;
|
|
255
|
+
letter-spacing: 0.01em;
|
|
256
|
+
color: var(--chronicle-text);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.continue-textarea {
|
|
260
|
+
width: 100%;
|
|
261
|
+
min-height: 7rem;
|
|
262
|
+
padding: 12px 14px;
|
|
263
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-border-strong) 76%, white 24%);
|
|
264
|
+
border-radius: 14px;
|
|
265
|
+
background: color-mix(in srgb, white 94%, var(--chronicle-card-surface) 6%);
|
|
266
|
+
color: var(--chronicle-text);
|
|
267
|
+
font: inherit;
|
|
268
|
+
line-height: 1.5;
|
|
269
|
+
resize: vertical;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.continue-help {
|
|
273
|
+
margin: 0;
|
|
274
|
+
font-size: 12px;
|
|
275
|
+
line-height: 1.5;
|
|
276
|
+
color: var(--chronicle-text-muted);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.recovery-button {
|
|
280
|
+
display: inline-flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
min-height: 48px;
|
|
284
|
+
padding: 8px 16px;
|
|
285
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-danger-text) 18%, var(--chronicle-border-strong) 82%);
|
|
286
|
+
border-radius: 999px;
|
|
287
|
+
background: color-mix(in srgb, white 92%, var(--chronicle-card-surface) 8%);
|
|
288
|
+
color: var(--chronicle-text);
|
|
289
|
+
font-size: 14px;
|
|
290
|
+
font-weight: 680;
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
transition:
|
|
293
|
+
background-color 160ms ease,
|
|
294
|
+
border-color 160ms ease,
|
|
295
|
+
transform 160ms ease;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.continue-editor .recovery-button {
|
|
299
|
+
align-self: flex-start;
|
|
300
|
+
padding-inline: 20px;
|
|
301
|
+
border-color: color-mix(in srgb, var(--chronicle-danger) 28%, var(--chronicle-text) 72%);
|
|
302
|
+
background: color-mix(in srgb, var(--chronicle-text) 88%, var(--chronicle-danger) 12%);
|
|
303
|
+
color: var(--chronicle-text-on-accent);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.recovery-button:hover:not(:disabled) {
|
|
307
|
+
background: color-mix(in srgb, white 82%, var(--chronicle-danger-text) 18%);
|
|
308
|
+
border-color: color-mix(in srgb, var(--chronicle-danger-text) 28%, var(--chronicle-border-strong) 72%);
|
|
309
|
+
transform: translateY(-1px);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.continue-editor .recovery-button:hover:not(:disabled) {
|
|
313
|
+
background: color-mix(in srgb, var(--chronicle-text) 82%, var(--chronicle-danger) 18%);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.recovery-button:disabled {
|
|
317
|
+
opacity: 0.62;
|
|
318
|
+
cursor: default;
|
|
319
|
+
transform: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.recovery-error {
|
|
323
|
+
font-size: 13px;
|
|
324
|
+
line-height: 1.5;
|
|
325
|
+
color: var(--chronicle-danger-text);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@media (max-width: 720px) {
|
|
329
|
+
.recovery-actions {
|
|
330
|
+
grid-template-columns: 1fr;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.recovery-button,
|
|
334
|
+
.continue-editor .recovery-button {
|
|
335
|
+
width: 100%;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
</style>
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ScheduledActionDetail } from "../../lib/api.js";
|
|
3
|
+
import { formatLocalDateTime24Hour, formatUtcDateTime24Hour } from "../../lib/format.js";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
anchorId: string;
|
|
7
|
+
isFocused: boolean;
|
|
8
|
+
scheduledAction: ScheduledActionDetail;
|
|
9
|
+
busy?: boolean;
|
|
10
|
+
error?: string | null;
|
|
11
|
+
onEdit: () => void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
anchorId,
|
|
17
|
+
isFocused,
|
|
18
|
+
scheduledAction,
|
|
19
|
+
busy = false,
|
|
20
|
+
error = null,
|
|
21
|
+
onEdit,
|
|
22
|
+
onCancel,
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<section
|
|
27
|
+
id={anchorId}
|
|
28
|
+
class="scheduled-action-section"
|
|
29
|
+
class:is-focused={isFocused}
|
|
30
|
+
data-anchor-id={anchorId}
|
|
31
|
+
data-focused={isFocused ? "true" : "false"}
|
|
32
|
+
data-section="scheduled-action"
|
|
33
|
+
tabindex="-1"
|
|
34
|
+
>
|
|
35
|
+
<div class="scheduled-action-header">
|
|
36
|
+
<div>
|
|
37
|
+
<p class="scheduled-eyebrow">Scheduled action</p>
|
|
38
|
+
<h3>{scheduledAction.actionLabel}</h3>
|
|
39
|
+
<p class="scheduled-copy">
|
|
40
|
+
Scheduled for {formatLocalDateTime24Hour(scheduledAction.nextRunAt)} · {formatUtcDateTime24Hour(
|
|
41
|
+
scheduledAction.nextRunAt,
|
|
42
|
+
)}
|
|
43
|
+
</p>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="scheduled-actions">
|
|
46
|
+
<button type="button" class="secondary-button" data-pressable="true" disabled={busy} onclick={onEdit}>
|
|
47
|
+
Edit
|
|
48
|
+
</button>
|
|
49
|
+
<button type="button" class="secondary-button" data-pressable="true" disabled={busy} onclick={onCancel}>
|
|
50
|
+
{busy ? "Canceling…" : "Cancel"}
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{#if scheduledAction.status === "blocked" && scheduledAction.blockedReason}
|
|
56
|
+
<p class="scheduled-error" role="alert">
|
|
57
|
+
Blocked — {scheduledAction.blockedReason.summary}. Edit the model selection or restore model
|
|
58
|
+
availability.
|
|
59
|
+
</p>
|
|
60
|
+
{/if}
|
|
61
|
+
|
|
62
|
+
{#if scheduledAction.action.preview}
|
|
63
|
+
<p class="scheduled-meta" data-section="scheduled-action-preview">
|
|
64
|
+
{scheduledAction.action.preview.kind === "terminal"
|
|
65
|
+
? "Preview · Completes this process"
|
|
66
|
+
: `Preview · ${scheduledAction.action.preview.description}`}
|
|
67
|
+
</p>
|
|
68
|
+
{/if}
|
|
69
|
+
{#if scheduledAction.nextTurnModelProfileId}
|
|
70
|
+
<p class="scheduled-meta">Model · {scheduledAction.nextTurnModelProfileId}</p>
|
|
71
|
+
{/if}
|
|
72
|
+
<p class="scheduled-lock-copy">
|
|
73
|
+
{scheduledAction.status === "blocked"
|
|
74
|
+
? "This process remains locked while the scheduled action is blocked or until it is canceled."
|
|
75
|
+
: "This process is locked until the scheduled action runs or is canceled."}
|
|
76
|
+
Retry and abort are still available from the top bar.
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
{#if error}
|
|
80
|
+
<p class="scheduled-error" role="alert">{error}</p>
|
|
81
|
+
{/if}
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<style>
|
|
85
|
+
.scheduled-action-section {
|
|
86
|
+
padding: 18px 20px;
|
|
87
|
+
margin-inline-start: var(--chronicle-secondary-indent, clamp(24px, 4vw, 48px));
|
|
88
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-accent) 34%, var(--chronicle-border) 66%);
|
|
89
|
+
border-radius: 18px;
|
|
90
|
+
background: color-mix(in srgb, var(--chronicle-accent) 6%, var(--chronicle-card-surface));
|
|
91
|
+
display: grid;
|
|
92
|
+
gap: 10px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.scheduled-action-section.is-focused {
|
|
96
|
+
border-color: color-mix(in srgb, var(--chronicle-accent) 52%, var(--chronicle-border) 48%);
|
|
97
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chronicle-accent) 24%, transparent 76%);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.scheduled-action-header {
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
gap: 16px;
|
|
104
|
+
align-items: start;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.scheduled-eyebrow {
|
|
108
|
+
margin: 0 0 4px;
|
|
109
|
+
font-size: 11px;
|
|
110
|
+
font-weight: 700;
|
|
111
|
+
letter-spacing: 0.08em;
|
|
112
|
+
text-transform: uppercase;
|
|
113
|
+
color: var(--chronicle-text-faint);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.scheduled-action-header h3 {
|
|
117
|
+
margin: 0;
|
|
118
|
+
font-family: var(--font-display);
|
|
119
|
+
font-size: 18px;
|
|
120
|
+
line-height: 1.25;
|
|
121
|
+
font-weight: 620;
|
|
122
|
+
color: var(--chronicle-text);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.scheduled-copy,
|
|
126
|
+
.scheduled-meta,
|
|
127
|
+
.scheduled-lock-copy,
|
|
128
|
+
.scheduled-error {
|
|
129
|
+
margin: 0;
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
line-height: 1.55;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.scheduled-copy,
|
|
135
|
+
.scheduled-meta,
|
|
136
|
+
.scheduled-lock-copy {
|
|
137
|
+
color: var(--chronicle-text-muted);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.scheduled-actions {
|
|
141
|
+
display: flex;
|
|
142
|
+
gap: 10px;
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
justify-content: flex-end;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.secondary-button {
|
|
148
|
+
min-height: 40px;
|
|
149
|
+
padding: 0 14px;
|
|
150
|
+
border-radius: 999px;
|
|
151
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-border-strong) 84%, white 16%);
|
|
152
|
+
background: color-mix(in srgb, var(--chronicle-card-surface) 94%, white 6%);
|
|
153
|
+
color: var(--chronicle-text);
|
|
154
|
+
font: inherit;
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
font-weight: 620;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.secondary-button:hover:not(:disabled) {
|
|
161
|
+
transform: translateY(-1px);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.secondary-button:disabled {
|
|
165
|
+
opacity: 0.62;
|
|
166
|
+
cursor: default;
|
|
167
|
+
transform: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.scheduled-error {
|
|
171
|
+
padding: 12px 14px;
|
|
172
|
+
border-radius: 14px;
|
|
173
|
+
border: 1px solid color-mix(in srgb, var(--chronicle-danger) 40%, var(--chronicle-border) 60%);
|
|
174
|
+
background: color-mix(in srgb, var(--chronicle-danger) 8%, var(--chronicle-card-surface));
|
|
175
|
+
color: var(--chronicle-danger-text);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@media (max-width: 720px) {
|
|
179
|
+
.scheduled-action-section {
|
|
180
|
+
margin-inline-start: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.scheduled-action-header {
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.scheduled-actions,
|
|
188
|
+
.secondary-button {
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
|
|
4
|
+
type SectionHeaderTone = "neutral" | "accent" | "danger";
|
|
5
|
+
type SectionHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
label: string;
|
|
9
|
+
secondary?: string | null;
|
|
10
|
+
meta?: string | null;
|
|
11
|
+
tone?: SectionHeaderTone;
|
|
12
|
+
headingLevel?: SectionHeadingLevel | null;
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
label,
|
|
18
|
+
secondary = null,
|
|
19
|
+
meta = null,
|
|
20
|
+
tone = "accent",
|
|
21
|
+
headingLevel = null,
|
|
22
|
+
children,
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
const headingTag = $derived(headingLevel ? (`h${headingLevel}` as const) : null);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div class="chronicle-section-header" data-tone={tone}>
|
|
29
|
+
<div class="section-label-row">
|
|
30
|
+
{#if headingTag}
|
|
31
|
+
<svelte:element this={headingTag} class="section-label">{label}</svelte:element>
|
|
32
|
+
{:else}
|
|
33
|
+
<p class="section-label">{label}</p>
|
|
34
|
+
{/if}
|
|
35
|
+
{#if secondary}
|
|
36
|
+
<span class="section-separator" aria-hidden="true"></span>
|
|
37
|
+
<span class="section-secondary">{secondary}</span>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
{#if children}
|
|
42
|
+
<div class="section-side">
|
|
43
|
+
{@render children()}
|
|
44
|
+
</div>
|
|
45
|
+
{:else if meta}
|
|
46
|
+
<span class="section-meta">{meta}</span>
|
|
47
|
+
{/if}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<style>
|
|
51
|
+
.chronicle-section-header {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: baseline;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
gap: var(--space-md);
|
|
56
|
+
min-width: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.section-label-row {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: baseline;
|
|
62
|
+
gap: var(--space-xs);
|
|
63
|
+
min-width: 0;
|
|
64
|
+
color: var(--chronicle-text-faint);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.chronicle-section-header[data-tone="accent"] .section-label {
|
|
68
|
+
color: var(--chronicle-accent);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.chronicle-section-header[data-tone="danger"] .section-label {
|
|
72
|
+
color: color-mix(in srgb, var(--chronicle-danger-text) 84%, var(--chronicle-text) 16%);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.section-label {
|
|
76
|
+
margin: 0;
|
|
77
|
+
font-size: var(--type-label);
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
letter-spacing: var(--tracking-label);
|
|
80
|
+
line-height: 1.4;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
color: inherit;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.section-separator {
|
|
86
|
+
align-self: center;
|
|
87
|
+
width: 1px;
|
|
88
|
+
height: 12px;
|
|
89
|
+
border-radius: 999px;
|
|
90
|
+
background: currentColor;
|
|
91
|
+
opacity: 0.36;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.section-secondary,
|
|
95
|
+
.section-meta {
|
|
96
|
+
font-size: var(--type-caption);
|
|
97
|
+
font-weight: 500;
|
|
98
|
+
font-variant-numeric: tabular-nums;
|
|
99
|
+
line-height: 1.4;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.section-secondary {
|
|
104
|
+
min-width: 0;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
color: inherit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.section-meta {
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
color: var(--chronicle-text-muted);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.section-side {
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: flex-end;
|
|
119
|
+
gap: var(--space-xs);
|
|
120
|
+
min-width: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (max-width: 720px) {
|
|
124
|
+
.chronicle-section-header {
|
|
125
|
+
align-items: flex-start;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: var(--space-xs);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.section-meta,
|
|
131
|
+
.section-side {
|
|
132
|
+
white-space: normal;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|