@chrysb/alphaclaw 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -24
- package/bin/alphaclaw.js +13 -2
- package/lib/public/css/tailwind.generated.css +1 -0
- package/lib/public/css/tailwind.input.css +3 -0
- package/lib/public/css/theme.css +28 -0
- package/lib/public/css/vendor/xterm.css +218 -0
- package/lib/public/dist/app.bundle.js +10514 -0
- package/lib/public/dist/chunks/addon-fit-W4YZGRNV.js +1 -0
- package/lib/public/dist/chunks/chunk-72ZECFVW.js +1 -0
- package/lib/public/dist/chunks/xterm-KOX4YMOF.js +9 -0
- package/lib/public/js/app.js +4 -4
- package/lib/public/js/components/action-button.js +8 -8
- package/lib/public/js/components/add-channel-menu.js +2 -2
- package/lib/public/js/components/agent-send-modal.js +6 -6
- package/lib/public/js/components/agents-tab/agent-bindings-section/channel-item-trailing.js +7 -7
- package/lib/public/js/components/agents-tab/agent-bindings-section/index.js +3 -3
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-agent-bindings.js +1 -1
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-channel-items.js +4 -4
- package/lib/public/js/components/agents-tab/agent-detail-panel.js +5 -5
- package/lib/public/js/components/agents-tab/agent-identity-section.js +18 -18
- package/lib/public/js/components/agents-tab/agent-overview/index.js +2 -2
- package/lib/public/js/components/agents-tab/agent-overview/manage-card.js +2 -2
- package/lib/public/js/components/agents-tab/agent-overview/model-card.js +8 -8
- package/lib/public/js/components/agents-tab/agent-overview/tools-card.js +5 -5
- package/lib/public/js/components/agents-tab/agent-overview/use-model-card.js +1 -1
- package/lib/public/js/components/agents-tab/agent-overview/use-workspace-card.js +1 -1
- package/lib/public/js/components/agents-tab/agent-overview/workspace-card.js +4 -4
- package/lib/public/js/components/agents-tab/agent-pairing-section.js +4 -4
- package/lib/public/js/components/agents-tab/agent-tools/index.js +5 -5
- package/lib/public/js/components/agents-tab/agent-tools/use-agent-tools.js +1 -1
- package/lib/public/js/components/agents-tab/create-agent-modal.js +13 -13
- package/lib/public/js/components/agents-tab/create-channel-modal.js +34 -34
- package/lib/public/js/components/agents-tab/delete-agent-dialog.js +3 -3
- package/lib/public/js/components/agents-tab/edit-agent-modal.js +9 -9
- package/lib/public/js/components/agents-tab/index.js +3 -3
- package/lib/public/js/components/agents-tab/use-agents.js +1 -1
- package/lib/public/js/components/badge.js +6 -6
- package/lib/public/js/components/channel-account-status-badge.js +2 -2
- package/lib/public/js/components/channel-operations-panel.js +2 -2
- package/lib/public/js/components/channels.js +9 -9
- package/lib/public/js/components/confirm-dialog.js +5 -5
- package/lib/public/js/components/credentials-modal.js +22 -22
- package/lib/public/js/components/cron-tab/cron-calendar.js +6 -6
- package/lib/public/js/components/cron-tab/cron-insights-panel.js +10 -10
- package/lib/public/js/components/cron-tab/cron-job-detail.js +4 -4
- package/lib/public/js/components/cron-tab/cron-job-list.js +4 -4
- package/lib/public/js/components/cron-tab/cron-job-settings-card.js +15 -15
- package/lib/public/js/components/cron-tab/cron-job-trends-panel.js +5 -5
- package/lib/public/js/components/cron-tab/cron-job-usage.js +16 -16
- package/lib/public/js/components/cron-tab/cron-overview.js +10 -10
- package/lib/public/js/components/cron-tab/cron-prompt-editor.js +3 -3
- package/lib/public/js/components/cron-tab/cron-run-history-panel.js +39 -39
- package/lib/public/js/components/cron-tab/cron-runs-trend-card.js +4 -4
- package/lib/public/js/components/cron-tab/index.js +5 -5
- package/lib/public/js/components/cron-tab/use-cron-tab.js +1 -1
- package/lib/public/js/components/device-pairings.js +12 -12
- package/lib/public/js/components/doctor/findings-list.js +22 -22
- package/lib/public/js/components/doctor/fix-card-modal.js +2 -2
- package/lib/public/js/components/doctor/general-warning.js +5 -5
- package/lib/public/js/components/doctor/index.js +26 -26
- package/lib/public/js/components/doctor/summary-cards.js +5 -5
- package/lib/public/js/components/envars.js +16 -16
- package/lib/public/js/components/features.js +4 -4
- package/lib/public/js/components/file-tree.js +4 -4
- package/lib/public/js/components/file-viewer/diff-viewer.js +2 -2
- package/lib/public/js/components/file-viewer/editor-surface.js +2 -2
- package/lib/public/js/components/file-viewer/frontmatter-panel.js +2 -2
- package/lib/public/js/components/file-viewer/index.js +3 -3
- package/lib/public/js/components/file-viewer/markdown-split-view.js +2 -2
- package/lib/public/js/components/file-viewer/media-preview.js +2 -2
- package/lib/public/js/components/file-viewer/scroll-sync.js +1 -1
- package/lib/public/js/components/file-viewer/sqlite-viewer.js +2 -2
- package/lib/public/js/components/file-viewer/status-banners.js +2 -2
- package/lib/public/js/components/file-viewer/toolbar.js +2 -2
- package/lib/public/js/components/file-viewer/use-editor-line-number-sync.js +1 -1
- package/lib/public/js/components/file-viewer/use-editor-selection-restore.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-diff.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-loader.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer-draft-sync.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer-hotkeys.js +1 -1
- package/lib/public/js/components/file-viewer/use-file-viewer.js +2 -2
- package/lib/public/js/components/gateway.js +12 -12
- package/lib/public/js/components/general/index.js +7 -7
- package/lib/public/js/components/general/use-general-tab.js +1 -1
- package/lib/public/js/components/global-restart-banner.js +2 -2
- package/lib/public/js/components/google/account-row.js +7 -7
- package/lib/public/js/components/google/add-account-modal.js +8 -8
- package/lib/public/js/components/google/gmail-setup-wizard.js +24 -24
- package/lib/public/js/components/google/gmail-watch-toggle.js +5 -5
- package/lib/public/js/components/google/index.js +6 -6
- package/lib/public/js/components/google/use-gmail-watch.js +1 -1
- package/lib/public/js/components/google/use-google-accounts.js +1 -1
- package/lib/public/js/components/icons.js +2 -2
- package/lib/public/js/components/info-tooltip.js +3 -3
- package/lib/public/js/components/loading-spinner.js +2 -2
- package/lib/public/js/components/modal-shell.js +5 -5
- package/lib/public/js/components/models-tab/index.js +11 -11
- package/lib/public/js/components/models-tab/model-picker.js +9 -9
- package/lib/public/js/components/models-tab/provider-auth-card.js +12 -12
- package/lib/public/js/components/models-tab/use-models.js +1 -1
- package/lib/public/js/components/models.js +18 -18
- package/lib/public/js/components/nodes-tab/browser-attach/index.js +5 -5
- package/lib/public/js/components/nodes-tab/connected-nodes/index.js +32 -32
- package/lib/public/js/components/nodes-tab/connected-nodes/use-connected-nodes-card.js +18 -3
- package/lib/public/js/components/nodes-tab/exec-allowlist/index.js +10 -10
- package/lib/public/js/components/nodes-tab/exec-allowlist/use-exec-allowlist.js +1 -1
- package/lib/public/js/components/nodes-tab/exec-config/index.js +13 -13
- package/lib/public/js/components/nodes-tab/exec-config/use-exec-config.js +1 -1
- package/lib/public/js/components/nodes-tab/index.js +2 -2
- package/lib/public/js/components/nodes-tab/setup-wizard/index.js +14 -14
- package/lib/public/js/components/nodes-tab/setup-wizard/use-setup-wizard.js +1 -1
- package/lib/public/js/components/nodes-tab/use-nodes-tab.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-codex.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-pairing.js +1 -1
- package/lib/public/js/components/onboarding/use-welcome-storage.js +1 -1
- package/lib/public/js/components/onboarding/welcome-config.js +3 -3
- package/lib/public/js/components/onboarding/welcome-form-step.js +34 -34
- package/lib/public/js/components/onboarding/welcome-header.js +2 -2
- package/lib/public/js/components/onboarding/welcome-import-step.js +22 -22
- package/lib/public/js/components/onboarding/welcome-pairing-step.js +15 -15
- package/lib/public/js/components/onboarding/welcome-placeholder-review-step.js +7 -7
- package/lib/public/js/components/onboarding/welcome-pre-step.js +9 -9
- package/lib/public/js/components/onboarding/welcome-secret-review-step.js +15 -15
- package/lib/public/js/components/onboarding/welcome-setup-step.js +8 -8
- package/lib/public/js/components/overflow-menu.js +3 -3
- package/lib/public/js/components/page-header.js +2 -2
- package/lib/public/js/components/pairings.js +14 -14
- package/lib/public/js/components/pane-shell.js +2 -2
- package/lib/public/js/components/pill-tabs.js +4 -4
- package/lib/public/js/components/pop-actions.js +3 -3
- package/lib/public/js/components/providers.js +17 -17
- package/lib/public/js/components/routes/agents-route.js +2 -2
- package/lib/public/js/components/routes/browse-route.js +2 -2
- package/lib/public/js/components/routes/cron-route.js +2 -2
- package/lib/public/js/components/routes/doctor-route.js +2 -2
- package/lib/public/js/components/routes/envars-route.js +2 -2
- package/lib/public/js/components/routes/general-route.js +2 -2
- package/lib/public/js/components/routes/models-route.js +2 -2
- package/lib/public/js/components/routes/nodes-route.js +2 -2
- package/lib/public/js/components/routes/providers-route.js +2 -2
- package/lib/public/js/components/routes/route-redirect.js +2 -2
- package/lib/public/js/components/routes/telegram-route.js +2 -2
- package/lib/public/js/components/routes/usage-route.js +2 -2
- package/lib/public/js/components/routes/watchdog-route.js +2 -2
- package/lib/public/js/components/routes/webhooks-route.js +2 -2
- package/lib/public/js/components/scope-picker.js +9 -9
- package/lib/public/js/components/secret-input.js +5 -5
- package/lib/public/js/components/segmented-control.js +2 -2
- package/lib/public/js/components/session-select-field.js +7 -7
- package/lib/public/js/components/sidebar-git-panel.js +3 -3
- package/lib/public/js/components/sidebar.js +3 -3
- package/lib/public/js/components/summary-stat-card.js +3 -3
- package/lib/public/js/components/telegram-workspace/index.js +10 -10
- package/lib/public/js/components/telegram-workspace/manage.js +36 -36
- package/lib/public/js/components/telegram-workspace/onboarding.js +73 -73
- package/lib/public/js/components/toast.js +8 -8
- package/lib/public/js/components/toggle-switch.js +2 -2
- package/lib/public/js/components/tooltip.js +5 -5
- package/lib/public/js/components/update-action-button.js +2 -2
- package/lib/public/js/components/update-modal.js +9 -9
- package/lib/public/js/components/usage-tab/constants.js +2 -2
- package/lib/public/js/components/usage-tab/index.js +3 -3
- package/lib/public/js/components/usage-tab/overview-section.js +15 -15
- package/lib/public/js/components/usage-tab/sessions-section.js +19 -19
- package/lib/public/js/components/usage-tab/use-usage-tab.js +2 -2
- package/lib/public/js/components/watchdog-tab/console/index.js +22 -8
- package/lib/public/js/components/watchdog-tab/console/use-console.js +28 -2
- package/lib/public/js/components/watchdog-tab/helpers.js +35 -6
- package/lib/public/js/components/watchdog-tab/incidents/index.js +6 -6
- package/lib/public/js/components/watchdog-tab/incidents/use-incidents.js +1 -1
- package/lib/public/js/components/watchdog-tab/index.js +4 -2
- package/lib/public/js/components/watchdog-tab/resource-bar.js +5 -5
- package/lib/public/js/components/watchdog-tab/resources/index.js +14 -3
- package/lib/public/js/components/watchdog-tab/resources/use-resources.js +1 -1
- package/lib/public/js/components/watchdog-tab/settings/index.js +97 -30
- package/lib/public/js/components/watchdog-tab/settings/use-settings.js +1 -1
- package/lib/public/js/components/watchdog-tab/terminal/index.js +3 -3
- package/lib/public/js/components/watchdog-tab/terminal/use-terminal.js +41 -5
- package/lib/public/js/components/watchdog-tab/use-watchdog-tab.js +2 -0
- package/lib/public/js/components/webhooks/create-webhook-modal/index.js +17 -17
- package/lib/public/js/components/webhooks/helpers.js +3 -3
- package/lib/public/js/components/webhooks/index.js +4 -4
- package/lib/public/js/components/webhooks/request-history/index.js +14 -14
- package/lib/public/js/components/webhooks/request-history/use-request-history.js +1 -1
- package/lib/public/js/components/webhooks/webhook-detail/index.js +41 -41
- package/lib/public/js/components/webhooks/webhook-detail/use-webhook-detail.js +1 -1
- package/lib/public/js/components/webhooks/webhook-list/index.js +11 -11
- package/lib/public/js/components/webhooks/webhook-list/use-webhook-list.js +1 -1
- package/lib/public/js/components/welcome/index.js +3 -3
- package/lib/public/js/components/welcome/use-welcome.js +10 -10
- package/lib/public/js/hooks/use-app-shell-controller.js +1 -1
- package/lib/public/js/hooks/use-app-shell-ui.js +1 -1
- package/lib/public/js/hooks/use-browse-navigation.js +1 -1
- package/lib/public/js/hooks/use-cached-fetch.js +1 -1
- package/lib/public/js/hooks/use-destination-session-selection.js +1 -1
- package/lib/public/js/hooks/use-hash-location.js +1 -1
- package/lib/public/js/hooks/useAgentSessions.js +1 -1
- package/lib/public/js/hooks/usePolling.js +1 -1
- package/lib/public/js/tailwind-config.js +39 -0
- package/lib/public/login.html +3 -18
- package/lib/public/setup.html +2 -18
- package/lib/server/init/register-server-routes.js +2 -0
- package/lib/server/routes/nodes.js +10 -2
- package/lib/server/routes/pairings.js +5 -1
- package/lib/server/routes/system.js +5 -0
- package/lib/server/routes/watchdog.js +15 -0
- package/lib/server/watchdog.js +137 -51
- package/lib/server.js +2 -0
- package/package.json +14 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useState, useEffect } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState, useEffect } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { showToast } from "../toast.js";
|
|
5
5
|
import { ActionButton } from "../action-button.js";
|
|
6
6
|
import { ConfirmDialog } from "../confirm-dialog.js";
|
|
@@ -13,7 +13,7 @@ const AgentSelect = ({ value, agents, onChange, className = "" }) => html`
|
|
|
13
13
|
<select
|
|
14
14
|
value=${value}
|
|
15
15
|
onChange=${(e) => onChange(e.target.value)}
|
|
16
|
-
class="bg-
|
|
16
|
+
class="bg-field border border-border rounded-lg px-2 py-1.5 text-xs text-body focus:outline-none focus:border-fg-muted ${className}"
|
|
17
17
|
>
|
|
18
18
|
<option value="">Default</option>
|
|
19
19
|
${agents.map(
|
|
@@ -174,15 +174,15 @@ export const ManageTelegramWorkspace = ({
|
|
|
174
174
|
<div class="flex justify-end">
|
|
175
175
|
<button
|
|
176
176
|
onclick=${onResetOnboarding}
|
|
177
|
-
class="text-xs px-3 py-1.5 rounded-lg border border-border text-
|
|
177
|
+
class="text-xs px-3 py-1.5 rounded-lg border border-border text-fg-muted hover:text-body hover:border-fg-muted transition-colors"
|
|
178
178
|
>
|
|
179
179
|
Reset onboarding
|
|
180
180
|
</button>
|
|
181
181
|
</div>
|
|
182
182
|
`}
|
|
183
|
-
<div class="bg-
|
|
184
|
-
<p class="text-sm text-
|
|
185
|
-
<p class="text-xs text-
|
|
183
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-1">
|
|
184
|
+
<p class="text-sm text-body font-medium">${groupName || groupId}</p>
|
|
185
|
+
<p class="text-xs text-fg-muted font-mono">${groupId}</p>
|
|
186
186
|
</div>
|
|
187
187
|
|
|
188
188
|
<div class="space-y-2">
|
|
@@ -190,23 +190,23 @@ export const ManageTelegramWorkspace = ({
|
|
|
190
190
|
${topicEntries.length > 0
|
|
191
191
|
? html`
|
|
192
192
|
<div
|
|
193
|
-
class="bg-
|
|
193
|
+
class="bg-field border border-border rounded-lg overflow-hidden"
|
|
194
194
|
>
|
|
195
195
|
<table class="w-full text-xs table-fixed">
|
|
196
196
|
<thead>
|
|
197
197
|
<tr class="border-b border-border">
|
|
198
|
-
<th class="text-left px-3 py-2 text-
|
|
198
|
+
<th class="text-left px-3 py-2 text-fg-muted font-medium">
|
|
199
199
|
Topic
|
|
200
200
|
</th>
|
|
201
201
|
<th
|
|
202
|
-
class="text-left px-3 py-2 text-
|
|
202
|
+
class="text-left px-3 py-2 text-fg-muted font-medium w-36"
|
|
203
203
|
>
|
|
204
204
|
Thread ID
|
|
205
205
|
</th>
|
|
206
206
|
${agents.length > 0 &&
|
|
207
207
|
html`
|
|
208
208
|
<th
|
|
209
|
-
class="text-left px-3 py-2 text-
|
|
209
|
+
class="text-left px-3 py-2 text-fg-muted font-medium w-32"
|
|
210
210
|
>
|
|
211
211
|
Agent
|
|
212
212
|
</th>
|
|
@@ -233,7 +233,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
233
233
|
if (e.key === "Enter") saveRename(id);
|
|
234
234
|
if (e.key === "Escape") cancelRename();
|
|
235
235
|
}}
|
|
236
|
-
class="w-full bg-
|
|
236
|
+
class="w-full bg-field border border-border rounded-lg px-2 py-1.5 text-xs text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted"
|
|
237
237
|
/>
|
|
238
238
|
<textarea
|
|
239
239
|
value=${editingTopicInstructions}
|
|
@@ -243,12 +243,12 @@ export const ManageTelegramWorkspace = ({
|
|
|
243
243
|
)}
|
|
244
244
|
placeholder="System instructions (optional)"
|
|
245
245
|
rows="6"
|
|
246
|
-
class="w-full bg-
|
|
246
|
+
class="w-full bg-field border border-border rounded-lg px-2 py-1.5 text-xs text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted resize-y"
|
|
247
247
|
/>
|
|
248
248
|
${agents.length > 0 &&
|
|
249
249
|
html`
|
|
250
250
|
<div class="flex items-center gap-2">
|
|
251
|
-
<label class="text-xs text-
|
|
251
|
+
<label class="text-xs text-fg-muted">Agent:</label>
|
|
252
252
|
<${AgentSelect}
|
|
253
253
|
value=${editingTopicAgentId}
|
|
254
254
|
agents=${agents}
|
|
@@ -270,7 +270,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
270
270
|
</button>
|
|
271
271
|
<button
|
|
272
272
|
onclick=${cancelRename}
|
|
273
|
-
class="text-xs px-2 py-1 rounded border border-border text-
|
|
273
|
+
class="text-xs px-2 py-1 rounded border border-border text-fg-muted hover:text-body hover:border-fg-muted"
|
|
274
274
|
>
|
|
275
275
|
Cancel
|
|
276
276
|
</button>
|
|
@@ -283,7 +283,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
283
283
|
<tr
|
|
284
284
|
class="border-b border-border last:border-0 align-middle"
|
|
285
285
|
>
|
|
286
|
-
<td class="px-3 py-2 text-
|
|
286
|
+
<td class="px-3 py-2 text-body">
|
|
287
287
|
<div class="flex items-center gap-2">
|
|
288
288
|
<span>${topic.name}</span>
|
|
289
289
|
<button
|
|
@@ -314,23 +314,23 @@ export const ManageTelegramWorkspace = ({
|
|
|
314
314
|
${topic.systemInstructions &&
|
|
315
315
|
html`
|
|
316
316
|
<p
|
|
317
|
-
class="text-[11px] text-
|
|
317
|
+
class="text-[11px] text-fg-muted mt-1 line-clamp-1"
|
|
318
318
|
>
|
|
319
319
|
${topic.systemInstructions}
|
|
320
320
|
</p>
|
|
321
321
|
`}
|
|
322
322
|
</td>
|
|
323
323
|
<td
|
|
324
|
-
class="px-3 py-2 text-
|
|
324
|
+
class="px-3 py-2 text-fg-muted font-mono w-36"
|
|
325
325
|
>
|
|
326
326
|
${id}
|
|
327
327
|
</td>
|
|
328
328
|
${agents.length > 0 &&
|
|
329
329
|
html`
|
|
330
|
-
<td class="px-3 py-2 text-
|
|
330
|
+
<td class="px-3 py-2 text-fg-muted w-32">
|
|
331
331
|
${topic.agentId
|
|
332
|
-
? html`<span class="text-
|
|
333
|
-
: html`<span class="text-
|
|
332
|
+
? html`<span class="text-body">${agents.find((a) => a.id === topic.agentId)?.name || topic.agentId}</span>`
|
|
333
|
+
: html`<span class="text-fg-dim">default</span>`}
|
|
334
334
|
</td>
|
|
335
335
|
`}
|
|
336
336
|
<td class="px-3 py-2">
|
|
@@ -344,7 +344,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
344
344
|
name: String(topic.name || ""),
|
|
345
345
|
})}
|
|
346
346
|
disabled=${deleting === id}
|
|
347
|
-
class="text-xs px-2 py-1 rounded border border-border text-
|
|
347
|
+
class="text-xs px-2 py-1 rounded border border-border text-fg-muted hover:text-status-error hover:border-red-500 ${deleting ===
|
|
348
348
|
id
|
|
349
349
|
? "opacity-50 cursor-not-allowed"
|
|
350
350
|
: ""}"
|
|
@@ -362,13 +362,13 @@ export const ManageTelegramWorkspace = ({
|
|
|
362
362
|
</table>
|
|
363
363
|
</div>
|
|
364
364
|
`
|
|
365
|
-
: html`<p class="text-xs text-
|
|
365
|
+
: html`<p class="text-xs text-fg-muted">No topics yet.</p>`}
|
|
366
366
|
</div>
|
|
367
367
|
|
|
368
368
|
${showCreateTopic &&
|
|
369
369
|
html`
|
|
370
|
-
<div class="space-y-2 bg-
|
|
371
|
-
<label class="text-xs text-
|
|
370
|
+
<div class="space-y-2 bg-field border border-border rounded-lg p-3">
|
|
371
|
+
<label class="text-xs text-fg-muted">Create new topic</label>
|
|
372
372
|
<div class="space-y-2">
|
|
373
373
|
<input
|
|
374
374
|
type="text"
|
|
@@ -378,19 +378,19 @@ export const ManageTelegramWorkspace = ({
|
|
|
378
378
|
if (e.key === "Enter") createSingle();
|
|
379
379
|
}}
|
|
380
380
|
placeholder="Topic name"
|
|
381
|
-
class="w-full bg-
|
|
381
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted"
|
|
382
382
|
/>
|
|
383
383
|
<textarea
|
|
384
384
|
value=${newTopicInstructions}
|
|
385
385
|
onInput=${(e) => setNewTopicInstructions(e.target.value)}
|
|
386
386
|
placeholder="System instructions (optional)"
|
|
387
387
|
rows="5"
|
|
388
|
-
class="w-full bg-
|
|
388
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted resize-y"
|
|
389
389
|
/>
|
|
390
390
|
${agents.length > 0 &&
|
|
391
391
|
html`
|
|
392
392
|
<div class="flex items-center gap-2">
|
|
393
|
-
<label class="text-xs text-
|
|
393
|
+
<label class="text-xs text-fg-muted">Agent:</label>
|
|
394
394
|
<${AgentSelect}
|
|
395
395
|
value=${newTopicAgentId}
|
|
396
396
|
agents=${agents}
|
|
@@ -415,7 +415,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
415
415
|
${error &&
|
|
416
416
|
html`
|
|
417
417
|
<div class="bg-red-500/10 border border-red-500/20 rounded-lg p-3">
|
|
418
|
-
<p class="text-sm text-
|
|
418
|
+
<p class="text-sm text-status-error-muted">${error}</p>
|
|
419
419
|
</div>
|
|
420
420
|
`}
|
|
421
421
|
|
|
@@ -423,7 +423,7 @@ export const ManageTelegramWorkspace = ({
|
|
|
423
423
|
<button
|
|
424
424
|
onclick=${() => setShowCreateTopic((v) => !v)}
|
|
425
425
|
class="${showCreateTopic
|
|
426
|
-
? "w-auto text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-
|
|
426
|
+
? "w-auto text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-body hover:border-fg-muted"
|
|
427
427
|
: "w-auto text-sm font-medium px-4 py-2 rounded-xl transition-all ac-btn-cyan"}"
|
|
428
428
|
>
|
|
429
429
|
${showCreateTopic ? "Close create topic" : "Create topic"}
|
|
@@ -432,13 +432,13 @@ export const ManageTelegramWorkspace = ({
|
|
|
432
432
|
|
|
433
433
|
<div class="border-t border-white/10" />
|
|
434
434
|
|
|
435
|
-
<p class="text-xs text-
|
|
435
|
+
<p class="text-xs text-fg-muted">
|
|
436
436
|
Concurrency is auto-scaled to support your group:
|
|
437
|
-
<span class="text-
|
|
438
|
-
<span class="text-
|
|
439
|
-
<span class="text-
|
|
437
|
+
<span class="text-body"> agent ${maxConcurrent}</span>,
|
|
438
|
+
<span class="text-body"> subagent ${subagentMaxConcurrent}</span>
|
|
439
|
+
<span class="text-fg-dim"> (${topicCount} topics)</span>.
|
|
440
440
|
</p>
|
|
441
|
-
<p class="text-[11px] text-
|
|
441
|
+
<p class="text-[11px] text-fg-muted">
|
|
442
442
|
This registry can drift if topics are created, renamed, or removed
|
|
443
443
|
outside this page. Your agent will update the registry if it notices a
|
|
444
444
|
discrepancy.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useState, useEffect } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState, useEffect } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { Badge } from "../badge.js";
|
|
5
5
|
import { showToast } from "../toast.js";
|
|
6
6
|
import { ActionButton } from "../action-button.js";
|
|
@@ -52,42 +52,42 @@ export const VerifyBotStep = ({ accountId, botInfo, setBotInfo, onNext }) => {
|
|
|
52
52
|
|
|
53
53
|
${botInfo &&
|
|
54
54
|
html`
|
|
55
|
-
<div class="bg-
|
|
55
|
+
<div class="bg-field border border-border rounded-lg p-3">
|
|
56
56
|
<div class="flex items-center gap-2">
|
|
57
|
-
<span class="text-sm text-
|
|
57
|
+
<span class="text-sm text-body font-medium">@${botInfo.username}</span>
|
|
58
58
|
<${Badge} tone="success">Connected</${Badge}>
|
|
59
59
|
</div>
|
|
60
|
-
<p class="text-xs text-
|
|
60
|
+
<p class="text-xs text-fg-muted mt-1">${botInfo.first_name}</p>
|
|
61
61
|
</div>
|
|
62
62
|
`}
|
|
63
63
|
${error &&
|
|
64
64
|
html`
|
|
65
65
|
<div class="bg-red-500/10 border border-red-500/20 rounded-lg p-3">
|
|
66
|
-
<p class="text-sm text-
|
|
66
|
+
<p class="text-sm text-status-error-muted">${error}</p>
|
|
67
67
|
</div>
|
|
68
68
|
`}
|
|
69
69
|
${!botInfo &&
|
|
70
70
|
!loading &&
|
|
71
71
|
!error &&
|
|
72
|
-
html` <p class="text-sm text-
|
|
72
|
+
html` <p class="text-sm text-fg-muted">Checking bot token...</p> `}
|
|
73
73
|
|
|
74
|
-
<div class="bg-
|
|
75
|
-
<p class="text-xs font-medium text-
|
|
74
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
75
|
+
<p class="text-xs font-medium text-body">
|
|
76
76
|
Before continuing, configure BotFather:
|
|
77
77
|
</p>
|
|
78
|
-
<ol class="text-xs text-
|
|
78
|
+
<ol class="text-xs text-fg-muted space-y-1.5 list-decimal list-inside">
|
|
79
79
|
<li>
|
|
80
|
-
Open <span class="text-
|
|
80
|
+
Open <span class="text-body">@BotFather</span> in Telegram
|
|
81
81
|
</li>
|
|
82
82
|
<li>
|
|
83
|
-
Send <code class="bg-
|
|
83
|
+
Send <code class="bg-field px-1 rounded">/mybots</code> and
|
|
84
84
|
select your bot
|
|
85
85
|
</li>
|
|
86
86
|
<li>
|
|
87
|
-
Go to <span class="text-
|
|
88
|
-
<span class="text-
|
|
87
|
+
Go to <span class="text-body">Bot Settings</span> >
|
|
88
|
+
<span class="text-body">Group Privacy</span>
|
|
89
89
|
</li>
|
|
90
|
-
<li>Turn it <span class="text-
|
|
90
|
+
<li>Turn it <span class="text-status-warning-muted font-medium">OFF</span></li>
|
|
91
91
|
</ol>
|
|
92
92
|
</div>
|
|
93
93
|
|
|
@@ -112,59 +112,59 @@ export const CreateGroupStep = ({ onNext, onBack }) => html`
|
|
|
112
112
|
<div class="space-y-4">
|
|
113
113
|
<h3 class="text-sm font-semibold">Create a Telegram Group</h3>
|
|
114
114
|
|
|
115
|
-
<div class="bg-
|
|
116
|
-
<p class="text-xs font-medium text-
|
|
117
|
-
<ol class="text-xs text-
|
|
115
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
116
|
+
<p class="text-xs font-medium text-body">Create the group</p>
|
|
117
|
+
<ol class="text-xs text-fg-muted space-y-2 list-decimal list-inside">
|
|
118
118
|
<li>
|
|
119
119
|
Open Telegram and create a${" "}
|
|
120
|
-
<span class="text-
|
|
120
|
+
<span class="text-body">new group</span>
|
|
121
121
|
</li>
|
|
122
122
|
<li>
|
|
123
|
-
Search for and add <span class="text-
|
|
123
|
+
Search for and add <span class="text-body">your bot</span> as a
|
|
124
124
|
member
|
|
125
125
|
</li>
|
|
126
126
|
<li>
|
|
127
|
-
Hit <span class="text-
|
|
127
|
+
Hit <span class="text-body">Next</span>, give the group a name
|
|
128
128
|
(e.g. "My Workspace"), and create it
|
|
129
129
|
</li>
|
|
130
130
|
</ol>
|
|
131
131
|
</div>
|
|
132
132
|
|
|
133
|
-
<div class="bg-
|
|
134
|
-
<p class="text-xs font-medium text-
|
|
135
|
-
<ol class="text-xs text-
|
|
133
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
134
|
+
<p class="text-xs font-medium text-body">Enable topics</p>
|
|
135
|
+
<ol class="text-xs text-fg-muted space-y-2 list-decimal list-inside">
|
|
136
136
|
<li>Tap the group name at the top to open settings</li>
|
|
137
137
|
<li>
|
|
138
|
-
Tap <span class="text-
|
|
139
|
-
<span class="text-
|
|
140
|
-
<span class="text-
|
|
138
|
+
Tap <span class="text-body">Edit</span> (pencil icon), scroll to
|
|
139
|
+
<span class="text-body"> Topics</span>, toggle it
|
|
140
|
+
<span class="text-status-warning-muted font-medium"> ON</span>
|
|
141
141
|
</li>
|
|
142
142
|
</ol>
|
|
143
143
|
</div>
|
|
144
144
|
|
|
145
|
-
<div class="bg-
|
|
146
|
-
<p class="text-xs font-medium text-
|
|
147
|
-
<ol class="text-xs text-
|
|
148
|
-
<li>Go to <span class="text-
|
|
145
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
146
|
+
<p class="text-xs font-medium text-body">Make the bot an admin</p>
|
|
147
|
+
<ol class="text-xs text-fg-muted space-y-2 list-decimal list-inside">
|
|
148
|
+
<li>Go to <span class="text-body">Members</span>, tap your bot</li>
|
|
149
149
|
<li>
|
|
150
|
-
Promote it to <span class="text-
|
|
150
|
+
Promote it to <span class="text-status-warning-muted font-medium">Admin</span>
|
|
151
151
|
</li>
|
|
152
152
|
<li>
|
|
153
153
|
Make sure
|
|
154
|
-
<span class="text-
|
|
154
|
+
<span class="text-status-warning-muted font-medium"> Manage Topics </span>
|
|
155
155
|
permission is enabled
|
|
156
156
|
</li>
|
|
157
157
|
</ol>
|
|
158
158
|
</div>
|
|
159
159
|
|
|
160
|
-
<p class="text-xs text-
|
|
160
|
+
<p class="text-xs text-fg-muted">
|
|
161
161
|
Once all three steps are done, continue to verify the setup.
|
|
162
162
|
</p>
|
|
163
163
|
|
|
164
164
|
<div class="grid grid-cols-2 gap-2">
|
|
165
165
|
<button
|
|
166
166
|
onclick=${onBack}
|
|
167
|
-
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-
|
|
167
|
+
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-body hover:border-fg-muted"
|
|
168
168
|
>
|
|
169
169
|
Back
|
|
170
170
|
</button>
|
|
@@ -261,18 +261,18 @@ export const AddBotStep = ({
|
|
|
261
261
|
<div class="space-y-4">
|
|
262
262
|
<h3 class="text-sm font-semibold">Verify Group</h3>
|
|
263
263
|
|
|
264
|
-
<div class="bg-
|
|
265
|
-
<p class="text-xs text-
|
|
266
|
-
<ol class="text-xs text-
|
|
264
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
265
|
+
<p class="text-xs text-fg-muted">To get your group chat ID:</p>
|
|
266
|
+
<ol class="text-xs text-fg-muted space-y-1 list-decimal list-inside">
|
|
267
267
|
<li>
|
|
268
|
-
Invite <span class="text-
|
|
268
|
+
Invite <span class="text-body">@myidbot</span> to your group
|
|
269
269
|
</li>
|
|
270
270
|
<li>
|
|
271
|
-
Send <code class="bg-
|
|
271
|
+
Send <code class="bg-field px-1 rounded">/getgroupid</code>
|
|
272
272
|
</li>
|
|
273
273
|
<li>
|
|
274
274
|
Copy the ID (starts with
|
|
275
|
-
<code class="bg-
|
|
275
|
+
<code class="bg-field px-1 rounded">-100</code>)
|
|
276
276
|
</li>
|
|
277
277
|
</ol>
|
|
278
278
|
</div>
|
|
@@ -283,7 +283,7 @@ export const AddBotStep = ({
|
|
|
283
283
|
value=${input}
|
|
284
284
|
onInput=${(e) => setInput(e.target.value)}
|
|
285
285
|
placeholder="-100XXXXXXXXXX"
|
|
286
|
-
class="flex-1 bg-
|
|
286
|
+
class="flex-1 bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted"
|
|
287
287
|
/>
|
|
288
288
|
<${ActionButton}
|
|
289
289
|
onClick=${verify}
|
|
@@ -300,17 +300,17 @@ export const AddBotStep = ({
|
|
|
300
300
|
${verifyGroupError &&
|
|
301
301
|
html`
|
|
302
302
|
<div class="bg-red-500/10 border border-red-500/20 rounded-lg p-3">
|
|
303
|
-
<p class="text-sm text-
|
|
303
|
+
<p class="text-sm text-status-error-muted">${verifyGroupError}</p>
|
|
304
304
|
</div>
|
|
305
305
|
`}
|
|
306
306
|
${groupInfo &&
|
|
307
307
|
html`
|
|
308
|
-
<div class="bg-
|
|
308
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
309
309
|
<div class="flex items-center gap-2">
|
|
310
|
-
<span class="text-sm text-
|
|
310
|
+
<span class="text-sm text-body font-medium">${groupInfo.chat.title}</span>
|
|
311
311
|
<${Badge} tone="success">Verified</${Badge}>
|
|
312
312
|
</div>
|
|
313
|
-
<div class="flex gap-3 text-xs text-
|
|
313
|
+
<div class="flex gap-3 text-xs text-fg-muted">
|
|
314
314
|
<span>Topics: ${groupInfo.chat.isForum ? "ON" : "OFF"}</span>
|
|
315
315
|
<span>Bot: ${groupInfo.bot.status}</span>
|
|
316
316
|
</div>
|
|
@@ -319,16 +319,16 @@ export const AddBotStep = ({
|
|
|
319
319
|
${groupInfo &&
|
|
320
320
|
verifyWarnings.length === 0 &&
|
|
321
321
|
html`
|
|
322
|
-
<div class="bg-
|
|
323
|
-
<p class="text-xs text-
|
|
322
|
+
<div class="bg-field border border-border rounded-lg p-3 space-y-2">
|
|
323
|
+
<p class="text-xs text-fg-muted">Your Telegram User ID</p>
|
|
324
324
|
<input
|
|
325
325
|
type="text"
|
|
326
326
|
value=${userId}
|
|
327
327
|
onInput=${(e) => setUserId(e.target.value)}
|
|
328
328
|
placeholder="e.g. 123456789"
|
|
329
|
-
class="w-full bg-
|
|
329
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted"
|
|
330
330
|
/>
|
|
331
|
-
<p class="text-xs text-
|
|
331
|
+
<p class="text-xs text-fg-muted">
|
|
332
332
|
Auto-filled from Telegram admins. Edit if needed.
|
|
333
333
|
</p>
|
|
334
334
|
</div>
|
|
@@ -338,20 +338,20 @@ export const AddBotStep = ({
|
|
|
338
338
|
<div
|
|
339
339
|
class="bg-red-500/10 border border-red-500/20 rounded-lg p-3 space-y-3"
|
|
340
340
|
>
|
|
341
|
-
<p class="text-xs font-medium text-
|
|
341
|
+
<p class="text-xs font-medium text-status-error">
|
|
342
342
|
Fix these before continuing:
|
|
343
343
|
</p>
|
|
344
|
-
<ul class="text-xs text-
|
|
344
|
+
<ul class="text-xs text-status-error space-y-1 list-disc list-inside">
|
|
345
345
|
${verifyWarnings.map((message) => html`<li>${message}</li>`)}
|
|
346
346
|
</ul>
|
|
347
|
-
<p class="text-xs text-
|
|
347
|
+
<p class="text-xs text-status-error ">Once fixed, hit Verify again.</p>
|
|
348
348
|
</div>
|
|
349
349
|
`}
|
|
350
350
|
|
|
351
351
|
<div class="grid grid-cols-2 gap-2">
|
|
352
352
|
<button
|
|
353
353
|
onclick=${onBack}
|
|
354
|
-
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-
|
|
354
|
+
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-body hover:border-fg-muted"
|
|
355
355
|
>
|
|
356
356
|
Back
|
|
357
357
|
</button>
|
|
@@ -438,15 +438,15 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
438
438
|
${topicEntries.length > 0 &&
|
|
439
439
|
html`
|
|
440
440
|
<div
|
|
441
|
-
class="bg-
|
|
441
|
+
class="bg-field border border-border rounded-lg overflow-hidden"
|
|
442
442
|
>
|
|
443
443
|
<table class="w-full text-xs">
|
|
444
444
|
<thead>
|
|
445
445
|
<tr class="border-b border-border">
|
|
446
|
-
<th class="text-left px-3 py-2 text-
|
|
446
|
+
<th class="text-left px-3 py-2 text-fg-muted font-medium">
|
|
447
447
|
Topic
|
|
448
448
|
</th>
|
|
449
|
-
<th class="text-left px-3 py-2 text-
|
|
449
|
+
<th class="text-left px-3 py-2 text-fg-muted font-medium">
|
|
450
450
|
Thread ID
|
|
451
451
|
</th>
|
|
452
452
|
<th class="px-3 py-2 w-8" />
|
|
@@ -456,8 +456,8 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
456
456
|
${topicEntries.map(
|
|
457
457
|
([id, t]) => html`
|
|
458
458
|
<tr class="border-b border-border last:border-0">
|
|
459
|
-
<td class="px-3 py-2 text-
|
|
460
|
-
<td class="px-3 py-2 text-
|
|
459
|
+
<td class="px-3 py-2 text-body">${t.name}</td>
|
|
460
|
+
<td class="px-3 py-2 text-fg-muted font-mono">${id}</td>
|
|
461
461
|
<td class="px-3 py-2">
|
|
462
462
|
<button
|
|
463
463
|
onclick=${() =>
|
|
@@ -466,7 +466,7 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
466
466
|
name: String(t.name || ""),
|
|
467
467
|
})}
|
|
468
468
|
disabled=${deleting === id}
|
|
469
|
-
class="text-
|
|
469
|
+
class="text-fg-dim hover:text-status-error-muted transition-colors ${deleting ===
|
|
470
470
|
id
|
|
471
471
|
? "opacity-50"
|
|
472
472
|
: ""}"
|
|
@@ -493,7 +493,7 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
493
493
|
`}
|
|
494
494
|
|
|
495
495
|
<div class="space-y-2">
|
|
496
|
-
<label class="text-xs text-
|
|
496
|
+
<label class="text-xs text-fg-muted">Add a topic</label>
|
|
497
497
|
<div class="space-y-2">
|
|
498
498
|
<div class="flex gap-2">
|
|
499
499
|
<input
|
|
@@ -504,7 +504,7 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
504
504
|
if (e.key === "Enter") createSingle();
|
|
505
505
|
}}
|
|
506
506
|
placeholder="Topic name"
|
|
507
|
-
class="flex-1 bg-
|
|
507
|
+
class="flex-1 bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted"
|
|
508
508
|
/>
|
|
509
509
|
</div>
|
|
510
510
|
<textarea
|
|
@@ -512,7 +512,7 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
512
512
|
onInput=${(e) => setNewTopicInstructions(e.target.value)}
|
|
513
513
|
placeholder="System instructions (optional)"
|
|
514
514
|
rows="4"
|
|
515
|
-
class="w-full bg-
|
|
515
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body placeholder-fg-dim focus:outline-none focus:border-fg-muted resize-y"
|
|
516
516
|
/>
|
|
517
517
|
<div class="flex justify-end">
|
|
518
518
|
<${ActionButton}
|
|
@@ -533,14 +533,14 @@ export const TopicsStep = ({ accountId, groupId, topics, setTopics, onNext, onBa
|
|
|
533
533
|
${error &&
|
|
534
534
|
html`
|
|
535
535
|
<div class="bg-red-500/10 border border-red-500/20 rounded-lg p-3">
|
|
536
|
-
<p class="text-sm text-
|
|
536
|
+
<p class="text-sm text-status-error-muted">${error}</p>
|
|
537
537
|
</div>
|
|
538
538
|
`}
|
|
539
539
|
|
|
540
540
|
<div class="grid grid-cols-2 gap-2">
|
|
541
541
|
<button
|
|
542
542
|
onclick=${onBack}
|
|
543
|
-
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-
|
|
543
|
+
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-body hover:border-fg-muted"
|
|
544
544
|
>
|
|
545
545
|
Back
|
|
546
546
|
</button>
|
|
@@ -583,16 +583,16 @@ export const SummaryStep = ({ groupId, groupInfo, topics, onBack, onDone }) => {
|
|
|
583
583
|
return html`
|
|
584
584
|
<div class="space-y-4">
|
|
585
585
|
<div class="max-w-xl mx-auto text-center space-y-10 mt-10">
|
|
586
|
-
<p class="text-sm font-medium text-
|
|
587
|
-
<p class="text-xs text-
|
|
586
|
+
<p class="text-sm font-medium text-status-success">🎉 Setup complete</p>
|
|
587
|
+
<p class="text-xs text-fg-muted">
|
|
588
588
|
The topic registry has been injected into
|
|
589
|
-
<code class="bg-
|
|
589
|
+
<code class="bg-field px-1 rounded">TOOLS.md</code> so your agent
|
|
590
590
|
knows which thread ID maps to which topic name.
|
|
591
591
|
</p>
|
|
592
592
|
|
|
593
|
-
<div class="bg-
|
|
594
|
-
<p class="text-xs text-
|
|
595
|
-
If you used <span class="text-
|
|
593
|
+
<div class="bg-field border border-border rounded-lg p-3">
|
|
594
|
+
<p class="text-xs text-fg-muted">
|
|
595
|
+
If you used <span class="text-body">@myidbot</span> to find IDs,
|
|
596
596
|
you can remove it from the group now.
|
|
597
597
|
</p>
|
|
598
598
|
</div>
|
|
@@ -601,7 +601,7 @@ export const SummaryStep = ({ groupId, groupInfo, topics, onBack, onDone }) => {
|
|
|
601
601
|
<div class="grid grid-cols-2 gap-2">
|
|
602
602
|
<button
|
|
603
603
|
onclick=${onBack}
|
|
604
|
-
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-
|
|
604
|
+
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all border border-border text-body hover:border-fg-muted"
|
|
605
605
|
>
|
|
606
606
|
Back
|
|
607
607
|
</button>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h } from '
|
|
2
|
-
import { useState, useEffect } from '
|
|
3
|
-
import { createPortal } from '
|
|
4
|
-
import htm from '
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { useState, useEffect } from 'preact/hooks';
|
|
3
|
+
import { createPortal } from 'preact/compat';
|
|
4
|
+
import htm from 'htm';
|
|
5
5
|
const html = htm.bind(h);
|
|
6
6
|
|
|
7
7
|
let toastId = 0;
|
|
@@ -19,10 +19,10 @@ const kToastTypeByAlias = {
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const kToastClassByType = {
|
|
22
|
-
success: "bg-
|
|
23
|
-
error: "bg-
|
|
24
|
-
warning: "bg-
|
|
25
|
-
info: "bg-
|
|
22
|
+
success: "bg-status-success-bg border border-status-success-border text-status-success",
|
|
23
|
+
error: "bg-status-error-bg border border-status-error-border text-status-error",
|
|
24
|
+
warning: "bg-status-warning-bg border border-status-warning-border text-status-warning",
|
|
25
|
+
info: "bg-status-info-bg border border-status-info-border text-status-info",
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const normalizeToastType = (type) => {
|