@chrysb/alphaclaw 0.8.1-beta.8 → 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 +15 -25
- 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 +57 -6
- 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 +22 -4
- 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/onboarding/github.js +39 -0
- package/lib/server/routes/nodes.js +12 -4
- 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, useCallback } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState, useCallback } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { LoadingSpinner } from "../loading-spinner.js";
|
|
6
6
|
import { buildApprovedImportSecrets } from "./welcome-secret-review-utils.js";
|
|
@@ -11,7 +11,7 @@ const SecretRow = ({ secret, selected, onToggle, envVarName, onEnvVarChange }) =
|
|
|
11
11
|
html`
|
|
12
12
|
<div
|
|
13
13
|
class="border border-border rounded-lg p-3 space-y-2 ${selected
|
|
14
|
-
? "bg-
|
|
14
|
+
? "bg-status-info-bg border-status-info-border"
|
|
15
15
|
: ""}"
|
|
16
16
|
>
|
|
17
17
|
<div class="flex items-start gap-2">
|
|
@@ -23,20 +23,20 @@ const SecretRow = ({ secret, selected, onToggle, envVarName, onEnvVarChange }) =
|
|
|
23
23
|
/>
|
|
24
24
|
<div class="flex-1 min-w-0">
|
|
25
25
|
<div class="flex items-center gap-2 flex-wrap">
|
|
26
|
-
<span class="text-xs font-mono text-
|
|
26
|
+
<span class="text-xs font-mono text-body truncate"
|
|
27
27
|
>${secret.maskedValue}</span
|
|
28
28
|
>
|
|
29
29
|
${secret.confidence === "high"
|
|
30
30
|
? html`<span
|
|
31
|
-
class="text-xs px-1.5 py-0.5 rounded-full bg-
|
|
31
|
+
class="text-xs px-1.5 py-0.5 rounded-full bg-status-error-bg text-status-error"
|
|
32
32
|
>high confidence</span
|
|
33
33
|
>`
|
|
34
34
|
: html`<span
|
|
35
|
-
class="text-xs px-1.5 py-0.5 rounded-full bg-
|
|
35
|
+
class="text-xs px-1.5 py-0.5 rounded-full bg-status-warning-bg text-status-warning"
|
|
36
36
|
>possible</span
|
|
37
37
|
>`}
|
|
38
38
|
</div>
|
|
39
|
-
<div class="text-xs text-
|
|
39
|
+
<div class="text-xs text-fg-muted mt-1">
|
|
40
40
|
Found in${" "}
|
|
41
41
|
<span class="font-mono">${secret.file || "config"}</span>
|
|
42
42
|
${secret.configPath
|
|
@@ -45,7 +45,7 @@ const SecretRow = ({ secret, selected, onToggle, envVarName, onEnvVarChange }) =
|
|
|
45
45
|
</div>
|
|
46
46
|
${secret.duplicateIn &&
|
|
47
47
|
html`
|
|
48
|
-
<div class="text-xs text-
|
|
48
|
+
<div class="text-xs text-status-warning-muted mt-1">
|
|
49
49
|
Also found in${" "}<span class="font-mono"
|
|
50
50
|
>${secret.duplicateIn}</span
|
|
51
51
|
>
|
|
@@ -56,12 +56,12 @@ const SecretRow = ({ secret, selected, onToggle, envVarName, onEnvVarChange }) =
|
|
|
56
56
|
${selected &&
|
|
57
57
|
html`
|
|
58
58
|
<div class="pl-6">
|
|
59
|
-
<label class="text-xs text-
|
|
59
|
+
<label class="text-xs text-fg-muted">Extract as env var:</label>
|
|
60
60
|
<input
|
|
61
61
|
type="text"
|
|
62
62
|
value=${envVarName}
|
|
63
63
|
onInput=${(e) => onEnvVarChange(e.target.value)}
|
|
64
|
-
class="w-full mt-1 bg-
|
|
64
|
+
class="w-full mt-1 bg-field border border-border rounded-lg px-3 py-1.5 text-xs text-body outline-none focus:border-fg-muted font-mono"
|
|
65
65
|
/>
|
|
66
66
|
</div>
|
|
67
67
|
`}
|
|
@@ -134,7 +134,7 @@ export const WelcomeSecretReviewStep = ({
|
|
|
134
134
|
return html`
|
|
135
135
|
<div class="flex flex-col items-center justify-center py-8 gap-3">
|
|
136
136
|
<${LoadingSpinner} />
|
|
137
|
-
<p class="text-sm text-
|
|
137
|
+
<p class="text-sm text-fg-muted">Applying import...</p>
|
|
138
138
|
</div>
|
|
139
139
|
`;
|
|
140
140
|
}
|
|
@@ -142,8 +142,8 @@ export const WelcomeSecretReviewStep = ({
|
|
|
142
142
|
return html`
|
|
143
143
|
<div class="space-y-3">
|
|
144
144
|
<div>
|
|
145
|
-
<h2 class="text-sm font-medium text-
|
|
146
|
-
<p class="text-xs text-
|
|
145
|
+
<h2 class="text-sm font-medium text-body">Review Secrets</h2>
|
|
146
|
+
<p class="text-xs text-fg-muted">
|
|
147
147
|
Select secrets to extract into environment variables. Inline values in
|
|
148
148
|
config will be replaced with ${"`"}${"${"}ENV_VAR_NAME${"}"}${"`"} references.
|
|
149
149
|
</p>
|
|
@@ -152,7 +152,7 @@ export const WelcomeSecretReviewStep = ({
|
|
|
152
152
|
${error &&
|
|
153
153
|
html`
|
|
154
154
|
<div
|
|
155
|
-
class="bg-
|
|
155
|
+
class="bg-status-error-bg border border-status-error-border rounded-xl p-3 text-status-error text-sm"
|
|
156
156
|
>
|
|
157
157
|
${error}
|
|
158
158
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { LoadingSpinner } from "../loading-spinner.js";
|
|
5
5
|
|
|
6
6
|
const html = htm.bind(h);
|
|
@@ -46,10 +46,10 @@ export const WelcomeSetupStep = ({ error, loading, onRetry, onBack }) => {
|
|
|
46
46
|
return html`
|
|
47
47
|
<div class="py-4 flex flex-col items-center text-center gap-3">
|
|
48
48
|
<h3 class="text-lg font-semibold text-white">Setup failed</h3>
|
|
49
|
-
<p class="text-sm text-
|
|
49
|
+
<p class="text-sm text-fg-muted">Fix the values and try again.</p>
|
|
50
50
|
</div>
|
|
51
51
|
<div
|
|
52
|
-
class="bg-
|
|
52
|
+
class="bg-status-error-bg border border-status-error-border rounded-xl p-3 text-status-error text-sm"
|
|
53
53
|
>
|
|
54
54
|
${error}
|
|
55
55
|
</div>
|
|
@@ -87,12 +87,12 @@ export const WelcomeSetupStep = ({ error, loading, onRetry, onBack }) => {
|
|
|
87
87
|
<h3 class="text-lg font-semibold text-white">
|
|
88
88
|
Initializing OpenClaw...
|
|
89
89
|
</h3>
|
|
90
|
-
<p class="text-sm text-
|
|
90
|
+
<p class="text-sm text-fg-muted">This could take 10-15 seconds</p>
|
|
91
91
|
</div>
|
|
92
92
|
<div
|
|
93
|
-
class="absolute bottom-3 left-3 right-3 bg-
|
|
93
|
+
class="absolute bottom-3 left-3 right-3 bg-field border border-border rounded-lg px-3 py-2 text-xs text-fg-muted"
|
|
94
94
|
>
|
|
95
|
-
<span class="text-
|
|
95
|
+
<span class="text-fg-muted">${currentTip.label}: </span>
|
|
96
96
|
${currentTip.text}
|
|
97
97
|
</div>
|
|
98
98
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useRef } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useRef } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
|
|
5
5
|
const html = htm.bind(h);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from '
|
|
2
|
-
import { useState } from '
|
|
3
|
-
import htm from '
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { useState } from 'preact/hooks';
|
|
3
|
+
import htm from 'htm';
|
|
4
4
|
import { ActionButton } from './action-button.js';
|
|
5
5
|
const html = htm.bind(h);
|
|
6
6
|
|
|
@@ -27,22 +27,22 @@ export const PairingRow = ({ p, onApprove, onReject }) => {
|
|
|
27
27
|
|
|
28
28
|
if (busy === "approve") {
|
|
29
29
|
return html`
|
|
30
|
-
<div class="bg-
|
|
31
|
-
<span class="text-
|
|
32
|
-
<span class="text-
|
|
30
|
+
<div class="bg-field rounded-lg p-3 mb-2 flex items-center gap-2">
|
|
31
|
+
<span class="text-status-success text-sm">Approved</span>
|
|
32
|
+
<span class="text-fg-muted text-xs">${label}${accountSuffix} · ${p.code || p.id || '?'}</span>
|
|
33
33
|
</div>`;
|
|
34
34
|
}
|
|
35
35
|
if (busy === "reject") {
|
|
36
36
|
return html`
|
|
37
|
-
<div class="bg-
|
|
38
|
-
<span class="text-
|
|
39
|
-
<span class="text-
|
|
37
|
+
<div class="bg-field rounded-lg p-3 mb-2 flex items-center gap-2">
|
|
38
|
+
<span class="text-fg-muted text-sm">Rejected</span>
|
|
39
|
+
<span class="text-fg-muted text-xs">${label}${accountSuffix} · ${p.code || p.id || '?'}</span>
|
|
40
40
|
</div>`;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
return html`
|
|
44
|
-
<div class="bg-
|
|
45
|
-
<div class="font-medium text-sm mb-2">${label}${accountSuffix} · <code class="text-
|
|
44
|
+
<div class="bg-field rounded-lg p-3 mb-2">
|
|
45
|
+
<div class="font-medium text-sm mb-2">${label}${accountSuffix} · <code class="text-fg-muted">${p.code || p.id || '?'}</code></div>
|
|
46
46
|
<div class="flex gap-2">
|
|
47
47
|
<${ActionButton}
|
|
48
48
|
onClick=${() => handle("approve")}
|
|
@@ -104,12 +104,12 @@ export function Pairings({
|
|
|
104
104
|
</div>`
|
|
105
105
|
: statusRefreshing
|
|
106
106
|
? html`<div class="text-center py-4 space-y-2">
|
|
107
|
-
<p class="text-
|
|
107
|
+
<p class="text-body text-sm">Updating pairing status...</p>
|
|
108
108
|
</div>`
|
|
109
109
|
: html`<div class="text-center py-4 space-y-2">
|
|
110
110
|
<div class="text-3xl">💬</div>
|
|
111
|
-
<p class="text-
|
|
112
|
-
<p class="text-
|
|
111
|
+
<p class="text-body text-sm">Send a message to your bot on ${channelList}</p>
|
|
112
|
+
<p class="text-fg-dim text-xs">The pairing request will appear here — it may take a few moments</p>
|
|
113
113
|
</div>`}
|
|
114
114
|
</div>`;
|
|
115
115
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import htm from "htm";
|
|
3
3
|
|
|
4
4
|
const html = htm.bind(h);
|
|
5
5
|
|
|
6
6
|
const kPillBaseClassName =
|
|
7
7
|
"inline-flex items-center rounded-full border px-3 py-1.5 text-xs font-medium transition-colors";
|
|
8
8
|
const kPillActiveClassName =
|
|
9
|
-
"border-cyan-500/40 bg-cyan-500/10 text-
|
|
9
|
+
"border-cyan-500/40 bg-cyan-500/10 text-status-info shadow-[0_0_0_1px_rgba(34,211,238,0.08)]";
|
|
10
10
|
const kPillInactiveClassName =
|
|
11
|
-
"border-border bg-
|
|
11
|
+
"border-border bg-field text-fg-muted hover:border-fg-muted hover:text-body";
|
|
12
12
|
|
|
13
13
|
export const PillTabs = ({
|
|
14
14
|
tabs = [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useState, useEffect, useRef } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState, useEffect, useRef } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
|
|
5
5
|
const html = htm.bind(h);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useRef, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useRef, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import {
|
|
5
5
|
fetchEnvVars,
|
|
6
6
|
saveEnvVars,
|
|
@@ -48,7 +48,7 @@ const FeatureTags = ({ provider, features = null }) => {
|
|
|
48
48
|
${uniqueFeatures.map(
|
|
49
49
|
(f) => html`
|
|
50
50
|
<span
|
|
51
|
-
class="text-xs px-1.5 py-0.5 rounded-md bg-white/5 text-
|
|
51
|
+
class="text-xs px-1.5 py-0.5 rounded-md bg-white/5 text-fg-muted"
|
|
52
52
|
>${f}</span
|
|
53
53
|
>
|
|
54
54
|
`,
|
|
@@ -353,7 +353,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
353
353
|
const renderCredentialField = (field) => html`
|
|
354
354
|
<div class="space-y-1">
|
|
355
355
|
<div class="flex items-center gap-3">
|
|
356
|
-
<label class="text-xs font-medium text-
|
|
356
|
+
<label class="text-xs font-medium text-fg-muted">${field.label}</label>
|
|
357
357
|
${field.url && !getKeyVal(envVars, field.key)
|
|
358
358
|
? html`<a
|
|
359
359
|
href=${field.url}
|
|
@@ -369,10 +369,10 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
369
369
|
onInput=${(e) => setEnvValue(field.key, e.target.value)}
|
|
370
370
|
placeholder=${field.placeholder || ""}
|
|
371
371
|
isSecret=${!field.isText}
|
|
372
|
-
inputClass="flex-1 w-full bg-
|
|
372
|
+
inputClass="flex-1 w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted font-mono"
|
|
373
373
|
/>
|
|
374
374
|
${field.hint
|
|
375
|
-
? html`<p class="text-xs text-
|
|
375
|
+
? html`<p class="text-xs text-fg-dim">${field.hint}</p>`
|
|
376
376
|
: null}
|
|
377
377
|
</div>
|
|
378
378
|
`;
|
|
@@ -380,7 +380,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
380
380
|
const renderCodexOAuth = () => html`
|
|
381
381
|
<div class="border border-border rounded-lg p-3 space-y-2">
|
|
382
382
|
<div class="flex items-center justify-between">
|
|
383
|
-
<span class="text-xs text-
|
|
383
|
+
<span class="text-xs text-fg-muted">Codex OAuth</span>
|
|
384
384
|
${codexStatus.connected
|
|
385
385
|
? html`<${Badge} tone="success">Connected</${Badge}>`
|
|
386
386
|
: html`<${Badge} tone="warning">Not connected</${Badge}>`}
|
|
@@ -413,7 +413,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
413
413
|
`
|
|
414
414
|
: html`
|
|
415
415
|
<div class="flex items-center justify-between gap-2">
|
|
416
|
-
<p class="text-xs text-
|
|
416
|
+
<p class="text-xs text-fg-muted">
|
|
417
417
|
${codexAuthWaiting
|
|
418
418
|
? "Complete login in the popup, then paste the redirect URL."
|
|
419
419
|
: "Paste the redirect URL from your browser to finish connecting."}
|
|
@@ -428,9 +428,9 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
428
428
|
`}
|
|
429
429
|
${!codexStatus.connected && codexAuthStarted
|
|
430
430
|
? html`
|
|
431
|
-
<p class="text-xs text-
|
|
431
|
+
<p class="text-xs text-fg-muted">
|
|
432
432
|
After login, copy the full redirect URL (starts with
|
|
433
|
-
<code class="text-xs bg-
|
|
433
|
+
<code class="text-xs bg-field px-1 rounded"
|
|
434
434
|
>http://localhost:1455/auth/callback</code
|
|
435
435
|
>) and paste it here.
|
|
436
436
|
</p>
|
|
@@ -439,7 +439,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
439
439
|
value=${codexManualInput}
|
|
440
440
|
onInput=${(e) => setCodexManualInput(e.target.value)}
|
|
441
441
|
placeholder="http://localhost:1455/auth/callback?code=...&state=..."
|
|
442
|
-
class="w-full bg-
|
|
442
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-xs text-body outline-none focus:border-fg-muted"
|
|
443
443
|
/>
|
|
444
444
|
<${ActionButton}
|
|
445
445
|
onClick=${completeCodexAuth}
|
|
@@ -506,7 +506,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
506
506
|
`}
|
|
507
507
|
/>
|
|
508
508
|
<div class="bg-surface border border-border rounded-xl p-4">
|
|
509
|
-
<div class="flex items-center gap-2 text-sm text-
|
|
509
|
+
<div class="flex items-center gap-2 text-sm text-fg-muted">
|
|
510
510
|
<${LoadingSpinner} className="h-4 w-4" />
|
|
511
511
|
Loading provider settings...
|
|
512
512
|
</div>
|
|
@@ -555,7 +555,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
555
555
|
selectedModel: next,
|
|
556
556
|
};
|
|
557
557
|
}}
|
|
558
|
-
class="w-full bg-
|
|
558
|
+
class="w-full bg-field border border-border rounded-lg pl-3 pr-8 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
559
559
|
>
|
|
560
560
|
<option value="">Select a model</option>
|
|
561
561
|
${modelOptions.map(
|
|
@@ -565,7 +565,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
565
565
|
</option>`,
|
|
566
566
|
)}
|
|
567
567
|
</select>
|
|
568
|
-
<p class="text-xs text-
|
|
568
|
+
<p class="text-xs text-fg-dim">
|
|
569
569
|
${modelsLoading
|
|
570
570
|
? "Loading model catalog..."
|
|
571
571
|
: modelsError
|
|
@@ -586,7 +586,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
586
586
|
};
|
|
587
587
|
return next;
|
|
588
588
|
})}
|
|
589
|
-
class="text-xs text-
|
|
589
|
+
class="text-xs text-fg-muted hover:text-body"
|
|
590
590
|
>
|
|
591
591
|
${showAllModels
|
|
592
592
|
? "Show recommended models"
|
|
@@ -623,7 +623,7 @@ export const Providers = ({ onRestartRequired = () => {} }) => {
|
|
|
623
623
|
: null}
|
|
624
624
|
${modelDirty && !hasSelectedProviderAuth
|
|
625
625
|
? html`
|
|
626
|
-
<p class="text-xs text-
|
|
626
|
+
<p class="text-xs text-status-warning-muted">
|
|
627
627
|
Set credentials for the selected provider before saving this model
|
|
628
628
|
change.
|
|
629
629
|
</p>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useEffect } from "
|
|
2
|
-
import { useLocation } from "
|
|
1
|
+
import { useEffect } from "preact/hooks";
|
|
2
|
+
import { useLocation } from "wouter-preact";
|
|
3
3
|
|
|
4
4
|
export const RouteRedirect = ({ to }) => {
|
|
5
5
|
const [, setLocation] = useLocation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from '
|
|
2
|
-
import { useState } from '
|
|
3
|
-
import htm from '
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { useState } from 'preact/hooks';
|
|
3
|
+
import htm from 'htm';
|
|
4
4
|
const html = htm.bind(h);
|
|
5
5
|
|
|
6
6
|
export const SERVICES = [
|
|
@@ -43,19 +43,19 @@ export function ScopePicker({ scopes, onToggle, apiStatus, loading }) {
|
|
|
43
43
|
const api = status[s.key];
|
|
44
44
|
let apiIndicator = null;
|
|
45
45
|
if (loading && !api && (readOn || writeOn)) {
|
|
46
|
-
apiIndicator = html`<span class="text-
|
|
46
|
+
apiIndicator = html`<span class="text-fg-muted text-xs flex items-center gap-1"><span class="inline-block w-3 h-3 border-2 border-fg-muted border-t-transparent rounded-full ac-spinner"></span></span>`;
|
|
47
47
|
} else if (api) {
|
|
48
48
|
if (api.status === 'ok') {
|
|
49
|
-
apiIndicator = html`<a href=${api.enableUrl || getApiEnableUrl(s.key)} target="_blank" class="text-
|
|
49
|
+
apiIndicator = html`<a href=${api.enableUrl || getApiEnableUrl(s.key)} target="_blank" class="text-status-success-muted hover:text-status-success text-xs px-1.5 py-0.5 rounded bg-green-500/10">API ✓</a>`;
|
|
50
50
|
} else if (api.status === 'not_enabled') {
|
|
51
|
-
apiIndicator = html`<a href=${api.enableUrl} target="_blank" class="text-
|
|
51
|
+
apiIndicator = html`<a href=${api.enableUrl} target="_blank" class="text-status-error-muted hover:text-status-error text-xs underline">Enable API</a>`;
|
|
52
52
|
} else if (api.status === 'error') {
|
|
53
|
-
apiIndicator = html`<a href=${api.enableUrl || getApiEnableUrl(s.key)} target="_blank" class="text-
|
|
53
|
+
apiIndicator = html`<a href=${api.enableUrl || getApiEnableUrl(s.key)} target="_blank" class="text-status-warning-muted hover:text-status-warning text-xs underline">Enable API</a>`;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return html`
|
|
58
|
-
<div class="flex items-center justify-between bg-
|
|
58
|
+
<div class="flex items-center justify-between bg-field rounded-lg px-3 py-2">
|
|
59
59
|
<span class="text-sm">${s.icon} ${s.label}</span>
|
|
60
60
|
<div class="flex items-center gap-2">
|
|
61
61
|
${apiIndicator}
|
|
@@ -68,7 +68,7 @@ export function ScopePicker({ scopes, onToggle, apiStatus, loading }) {
|
|
|
68
68
|
<button
|
|
69
69
|
type="button"
|
|
70
70
|
onclick=${() => setShowAll((prev) => !prev)}
|
|
71
|
-
class="ml-3 text-xs text-
|
|
71
|
+
class="ml-3 text-xs text-fg-muted hover:text-body"
|
|
72
72
|
>
|
|
73
73
|
${showAll ? 'Show fewer services' : `Show more services (${SERVICES.length - kVisibleCount})`}
|
|
74
74
|
</button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { LoadingSpinner } from "./loading-spinner.js";
|
|
5
5
|
const html = htm.bind(h);
|
|
6
6
|
|
|
@@ -38,14 +38,14 @@ export const SecretInput = ({
|
|
|
38
38
|
autocomplete="off"
|
|
39
39
|
/>
|
|
40
40
|
${loading
|
|
41
|
-
? html`<${LoadingSpinner} className="h-3 w-3 text-
|
|
41
|
+
? html`<${LoadingSpinner} className="h-3 w-3 text-fg-muted shrink-0" />`
|
|
42
42
|
: null}
|
|
43
43
|
${showToggle
|
|
44
44
|
? html`<button
|
|
45
45
|
type="button"
|
|
46
46
|
onclick=${() => setVisible((v) => !v)}
|
|
47
47
|
disabled=${isDisabled}
|
|
48
|
-
class="text-
|
|
48
|
+
class="text-fg-muted hover:text-body px-1 text-xs shrink-0"
|
|
49
49
|
>
|
|
50
50
|
${visible ? "Hide" : "Show"}
|
|
51
51
|
</button>`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import htm from "htm";
|
|
3
3
|
import { getSessionRowKey } from "../lib/session-keys.js";
|
|
4
4
|
|
|
5
5
|
const html = htm.bind(h);
|
|
@@ -20,11 +20,11 @@ export const SessionSelectField = ({
|
|
|
20
20
|
emptyStateText = "",
|
|
21
21
|
loadingLabel = "Loading sessions...",
|
|
22
22
|
containerClassName = "space-y-2",
|
|
23
|
-
labelClassName = "text-xs text-
|
|
24
|
-
selectClassName = "w-full bg-
|
|
25
|
-
helperClassName = "text-xs text-
|
|
26
|
-
statusClassName = "text-xs text-
|
|
27
|
-
errorClassName = "text-xs text-
|
|
23
|
+
labelClassName = "text-xs text-fg-muted",
|
|
24
|
+
selectClassName = "w-full bg-field border border-border rounded-lg px-3 py-2 text-xs text-body focus:border-fg-muted",
|
|
25
|
+
helperClassName = "text-xs text-fg-muted",
|
|
26
|
+
statusClassName = "text-xs text-fg-muted",
|
|
27
|
+
errorClassName = "text-xs text-status-error-muted",
|
|
28
28
|
}) => {
|
|
29
29
|
const resolvedValue = selectedSessionKey || (allowNone ? noneValue : "");
|
|
30
30
|
const isDisabled = disabled || loading;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { fetchBrowseGitSummary, syncBrowseChanges } from "../lib/api.js";
|
|
5
5
|
import { formatLocaleDateTime } from "../lib/format.js";
|
|
6
6
|
import { ActionButton } from "./action-button.js";
|