@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
package/lib/public/js/app.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h, render } from "
|
|
2
|
-
import { useState, useEffect } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h, render } from "preact";
|
|
2
|
+
import { useState, useEffect } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import {
|
|
5
5
|
Router,
|
|
6
6
|
Route,
|
|
7
7
|
Switch,
|
|
8
8
|
useLocation,
|
|
9
|
-
} from "
|
|
9
|
+
} from "wouter-preact";
|
|
10
10
|
import { logout } from "./lib/api.js";
|
|
11
11
|
import { Welcome } from "./components/welcome/index.js";
|
|
12
12
|
import { ToastContainer } from "./components/toast.js";
|
|
@@ -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 { LoadingSpinner } from "./loading-spinner.js";
|
|
4
4
|
|
|
5
5
|
const html = htm.bind(h);
|
|
@@ -15,18 +15,18 @@ const kStaticToneClassByTone = {
|
|
|
15
15
|
const getToneClass = (tone, isInteractive) => {
|
|
16
16
|
if (tone === "subtle") {
|
|
17
17
|
return isInteractive
|
|
18
|
-
? "border border-border text-
|
|
19
|
-
: "border border-border text-
|
|
18
|
+
? "border border-border text-fg-muted hover:text-body hover:border-fg-muted"
|
|
19
|
+
: "border border-border text-fg-muted";
|
|
20
20
|
}
|
|
21
21
|
if (tone === "neutral") {
|
|
22
22
|
return isInteractive
|
|
23
|
-
? "border border-border text-
|
|
24
|
-
: "border border-border text-
|
|
23
|
+
? "border border-border text-fg-muted hover:text-body hover:border-fg-muted"
|
|
24
|
+
: "border border-border text-fg-muted";
|
|
25
25
|
}
|
|
26
26
|
if (tone === "warning") {
|
|
27
27
|
return isInteractive
|
|
28
|
-
? "border border-yellow-500/35 text-
|
|
29
|
-
: "border border-yellow-500/35 text-
|
|
28
|
+
? "border border-yellow-500/35 text-status-warning-muted bg-yellow-500/10 hover:border-yellow-400/60 hover:text-status-warning hover:bg-yellow-500/15"
|
|
29
|
+
: "border border-yellow-500/35 text-status-warning-muted bg-yellow-500/10";
|
|
30
30
|
}
|
|
31
31
|
return kStaticToneClassByTone[tone] || kStaticToneClassByTone.primary;
|
|
32
32
|
};
|
|
@@ -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 { ActionButton } from "./action-button.js";
|
|
4
4
|
import { AddLineIcon } from "./icons.js";
|
|
5
5
|
import { OverflowMenu, OverflowMenuItem } from "./overflow-menu.js";
|
|
@@ -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 { ModalShell } from "./modal-shell.js";
|
|
5
5
|
import { ActionButton } from "./action-button.js";
|
|
6
6
|
import { PageHeader } from "./page-header.js";
|
|
@@ -80,7 +80,7 @@ export const AgentSendModal = ({
|
|
|
80
80
|
class="h-8 w-8 inline-flex items-center justify-center rounded-lg ac-btn-secondary"
|
|
81
81
|
aria-label="Close modal"
|
|
82
82
|
>
|
|
83
|
-
<${CloseIcon} className="w-3.5 h-3.5 text-
|
|
83
|
+
<${CloseIcon} className="w-3.5 h-3.5 text-body" />
|
|
84
84
|
</button>
|
|
85
85
|
`}
|
|
86
86
|
/>
|
|
@@ -95,14 +95,14 @@ export const AgentSendModal = ({
|
|
|
95
95
|
emptyOptionLabel="No sessions available"
|
|
96
96
|
/>
|
|
97
97
|
<div class="space-y-2">
|
|
98
|
-
<label class="text-xs text-
|
|
98
|
+
<label class="text-xs text-fg-muted">${messageLabel}</label>
|
|
99
99
|
<textarea
|
|
100
100
|
value=${messageText}
|
|
101
101
|
onInput=${(event) =>
|
|
102
102
|
setMessageText(String(event.currentTarget?.value || ""))}
|
|
103
103
|
disabled=${sending}
|
|
104
104
|
rows=${messageRows}
|
|
105
|
-
class="w-full bg-
|
|
105
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-xs text-body focus:border-fg-muted font-mono leading-5"
|
|
106
106
|
></textarea>
|
|
107
107
|
</div>
|
|
108
108
|
<div class="flex items-center justify-end gap-2">
|
|
@@ -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 { Badge } from "../../badge.js";
|
|
4
4
|
import { ChannelAccountStatusBadge } from "../../channel-account-status-badge.js";
|
|
5
5
|
import { OverflowMenu, OverflowMenuItem } from "../../overflow-menu.js";
|
|
@@ -118,7 +118,7 @@ export const ChannelItemTrailing = ({
|
|
|
118
118
|
${canEditOrDelete
|
|
119
119
|
? html`
|
|
120
120
|
<${OverflowMenuItem}
|
|
121
|
-
className="text-
|
|
121
|
+
className="text-status-error hover:text-status-error"
|
|
122
122
|
onClick=${() => openDeleteChannelDialog(accountData)}
|
|
123
123
|
>
|
|
124
124
|
Delete
|
|
@@ -146,7 +146,7 @@ export const ChannelCardItem = ({
|
|
|
146
146
|
<div
|
|
147
147
|
key=${item.id || item.channel}
|
|
148
148
|
class="flex justify-between items-center py-1.5 ${canOpenWorkspace
|
|
149
|
-
? "cursor-pointer hover:bg-
|
|
149
|
+
? "cursor-pointer hover:bg-surface -mx-2 px-2 rounded-lg transition-colors"
|
|
150
150
|
: ""}"
|
|
151
151
|
onclick=${canOpenWorkspace
|
|
152
152
|
? () => onSetLocation(`/telegram/${encodeURIComponent(accountId)}`)
|
|
@@ -163,18 +163,18 @@ export const ChannelCardItem = ({
|
|
|
163
163
|
/>
|
|
164
164
|
`
|
|
165
165
|
: null}
|
|
166
|
-
<span class="truncate ${item?.dimmedLabel ? "text-
|
|
166
|
+
<span class="truncate ${item?.dimmedLabel ? "text-fg-muted" : ""} ${item?.labelClassName || ""}">
|
|
167
167
|
${item?.label || channelMeta?.label || "Channel"}
|
|
168
168
|
</span>
|
|
169
169
|
${canOpenWorkspace
|
|
170
170
|
? html`
|
|
171
|
-
<span class="text-xs text-
|
|
171
|
+
<span class="text-xs text-fg-muted ml-1 shrink-0">Workspace</span>
|
|
172
172
|
<svg
|
|
173
173
|
width="14"
|
|
174
174
|
height="14"
|
|
175
175
|
viewBox="0 0 16 16"
|
|
176
176
|
fill="none"
|
|
177
|
-
class="text-
|
|
177
|
+
class="text-fg-dim shrink-0"
|
|
178
178
|
>
|
|
179
179
|
<path
|
|
180
180
|
d="M6 3.5L10.5 8L6 12.5"
|
|
@@ -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 { isChannelProviderDisabledForAdd } from "../../../lib/channel-provider-availability.js";
|
|
4
4
|
import { AddChannelMenu } from "../../add-channel-menu.js";
|
|
5
5
|
import { ActionButton } from "../../action-button.js";
|
|
@@ -162,7 +162,7 @@ export const AgentBindingsSection = ({
|
|
|
162
162
|
message=""
|
|
163
163
|
details=${pendingBindAccount
|
|
164
164
|
? html`
|
|
165
|
-
<p class="text-xs text-
|
|
165
|
+
<p class="text-xs text-fg-muted">
|
|
166
166
|
This will remove access for ${String(
|
|
167
167
|
pendingBindAccount?.ownerAgentName || "the other agent",
|
|
168
168
|
).trim()} to this channel.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import {
|
|
5
5
|
canAgentBindAccount,
|
|
6
6
|
getChannelItemSortRank,
|
|
@@ -186,7 +186,7 @@ export const useChannelItems = ({
|
|
|
186
186
|
onClick: () => setShowAssignedElsewhere((current) => !current),
|
|
187
187
|
dimmedLabel: true,
|
|
188
188
|
trailing: html`
|
|
189
|
-
<span class="inline-flex items-center gap-1.5 text-
|
|
189
|
+
<span class="inline-flex items-center gap-1.5 text-fg-muted">
|
|
190
190
|
<span class="text-[11px] px-2 py-0.5 rounded-full border border-border">
|
|
191
191
|
${assignedElsewhereItems.length}
|
|
192
192
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useState, useCallback, useMemo } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useState, useCallback, useMemo } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { Badge } from "../badge.js";
|
|
6
6
|
import { PillTabs } from "../pill-tabs.js";
|
|
@@ -92,7 +92,7 @@ export const AgentDetailPanel = ({
|
|
|
92
92
|
</span>
|
|
93
93
|
<button
|
|
94
94
|
type="button"
|
|
95
|
-
class="text-
|
|
95
|
+
class="text-fg-muted hover:text-body transition-colors p-0.5 -ml-0.5"
|
|
96
96
|
onclick=${() => onEdit(agent)}
|
|
97
97
|
title="Edit agent name"
|
|
98
98
|
>
|
|
@@ -102,7 +102,7 @@ export const AgentDetailPanel = ({
|
|
|
102
102
|
? html`<${Badge} tone="cyan">Default</${Badge}>`
|
|
103
103
|
: null}
|
|
104
104
|
</div>
|
|
105
|
-
<div class="mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 min-w-0 text-xs text-
|
|
105
|
+
<div class="mt-1 flex flex-wrap items-center gap-x-1.5 gap-y-1 min-w-0 text-xs text-fg-muted">
|
|
106
106
|
<span class="font-mono">${agent.id}</span>
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
@@ -1,14 +1,14 @@
|
|
|
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 { ActionButton } from "../action-button.js";
|
|
5
5
|
|
|
6
6
|
const html = htm.bind(h);
|
|
7
7
|
|
|
8
8
|
const kPropertyRowClass =
|
|
9
9
|
"flex items-start justify-between gap-4 py-2.5 border-b border-border last:border-b-0";
|
|
10
|
-
const kLabelClass = "text-xs text-
|
|
11
|
-
const kValueClass = "text-sm text-
|
|
10
|
+
const kLabelClass = "text-xs text-fg-muted shrink-0 w-28";
|
|
11
|
+
const kValueClass = "text-sm text-body text-right min-w-0 break-all";
|
|
12
12
|
|
|
13
13
|
const normalizeIdentity = (identity = {}) => ({
|
|
14
14
|
name: String(identity?.name || "").trim(),
|
|
@@ -100,46 +100,46 @@ export const AgentIdentitySection = ({
|
|
|
100
100
|
? html`
|
|
101
101
|
<div class="space-y-3">
|
|
102
102
|
<label class="block space-y-1">
|
|
103
|
-
<span class="text-xs text-
|
|
103
|
+
<span class="text-xs text-fg-muted">Identity name</span>
|
|
104
104
|
<input
|
|
105
105
|
type="text"
|
|
106
106
|
value=${form.name}
|
|
107
107
|
onInput=${(event) => updateField("name", event.target.value)}
|
|
108
|
-
class="w-full bg-
|
|
108
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
109
109
|
placeholder="Optional persona name"
|
|
110
110
|
/>
|
|
111
111
|
</label>
|
|
112
112
|
<label class="block space-y-1">
|
|
113
|
-
<span class="text-xs text-
|
|
113
|
+
<span class="text-xs text-fg-muted">Emoji</span>
|
|
114
114
|
<input
|
|
115
115
|
type="text"
|
|
116
116
|
value=${form.emoji}
|
|
117
117
|
onInput=${(event) => updateField("emoji", event.target.value)}
|
|
118
|
-
class="w-full bg-
|
|
118
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
119
119
|
placeholder="Optional emoji"
|
|
120
120
|
/>
|
|
121
121
|
</label>
|
|
122
122
|
<label class="block space-y-1">
|
|
123
|
-
<span class="text-xs text-
|
|
123
|
+
<span class="text-xs text-fg-muted">Avatar</span>
|
|
124
124
|
<input
|
|
125
125
|
type="text"
|
|
126
126
|
value=${form.avatar}
|
|
127
127
|
onInput=${(event) => updateField("avatar", event.target.value)}
|
|
128
|
-
class="w-full bg-
|
|
128
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
129
129
|
placeholder="Workspace-relative path, URL, or data URI"
|
|
130
130
|
/>
|
|
131
131
|
</label>
|
|
132
132
|
<label class="block space-y-1">
|
|
133
|
-
<span class="text-xs text-
|
|
133
|
+
<span class="text-xs text-fg-muted">Theme</span>
|
|
134
134
|
<input
|
|
135
135
|
type="text"
|
|
136
136
|
value=${form.theme}
|
|
137
137
|
onInput=${(event) => updateField("theme", event.target.value)}
|
|
138
|
-
class="w-full bg-
|
|
138
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
139
139
|
placeholder="Optional persona theme"
|
|
140
140
|
/>
|
|
141
141
|
</label>
|
|
142
|
-
${error ? html`<p class="text-xs text-
|
|
142
|
+
${error ? html`<p class="text-xs text-status-error-muted">${error}</p>` : null}
|
|
143
143
|
</div>
|
|
144
144
|
`
|
|
145
145
|
: html`
|
|
@@ -147,25 +147,25 @@ export const AgentIdentitySection = ({
|
|
|
147
147
|
<div class=${kPropertyRowClass}>
|
|
148
148
|
<span class=${kLabelClass}>Name</span>
|
|
149
149
|
<span class=${kValueClass}>
|
|
150
|
-
${identity.name || html`<span class="text-
|
|
150
|
+
${identity.name || html`<span class="text-fg-muted">—</span>`}
|
|
151
151
|
</span>
|
|
152
152
|
</div>
|
|
153
153
|
<div class=${kPropertyRowClass}>
|
|
154
154
|
<span class=${kLabelClass}>Emoji</span>
|
|
155
155
|
<span class=${kValueClass}>
|
|
156
|
-
${identity.emoji || html`<span class="text-
|
|
156
|
+
${identity.emoji || html`<span class="text-fg-muted">—</span>`}
|
|
157
157
|
</span>
|
|
158
158
|
</div>
|
|
159
159
|
<div class=${kPropertyRowClass}>
|
|
160
160
|
<span class=${kLabelClass}>Avatar</span>
|
|
161
161
|
<span class="${kValueClass} font-mono">
|
|
162
|
-
${identity.avatar || html`<span class="text-
|
|
162
|
+
${identity.avatar || html`<span class="text-fg-muted">—</span>`}
|
|
163
163
|
</span>
|
|
164
164
|
</div>
|
|
165
165
|
<div class=${kPropertyRowClass}>
|
|
166
166
|
<span class=${kLabelClass}>Theme</span>
|
|
167
167
|
<span class=${kValueClass}>
|
|
168
|
-
${identity.theme || html`<span class="text-
|
|
168
|
+
${identity.theme || html`<span class="text-fg-muted">—</span>`}
|
|
169
169
|
</span>
|
|
170
170
|
</div>
|
|
171
171
|
</div>
|
|
@@ -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 { ChannelOperationsPanel } from "../../channel-operations-panel.js";
|
|
4
4
|
import { ManageCard } from "./manage-card.js";
|
|
5
5
|
import { AgentModelCard } from "./model-card.js";
|
|
@@ -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 { Badge } from "../../badge.js";
|
|
4
4
|
import { LoadingSpinner } from "../../loading-spinner.js";
|
|
5
5
|
import { OverflowMenu, OverflowMenuItem } from "../../overflow-menu.js";
|
|
@@ -81,13 +81,13 @@ export const AgentModelCard = ({
|
|
|
81
81
|
</div>
|
|
82
82
|
${loading
|
|
83
83
|
? html`
|
|
84
|
-
<div class="flex items-center gap-2 text-sm text-
|
|
84
|
+
<div class="flex items-center gap-2 text-sm text-fg-muted py-1">
|
|
85
85
|
<${LoadingSpinner} className="h-4 w-4" />
|
|
86
86
|
Loading model settings...
|
|
87
87
|
</div>
|
|
88
88
|
`
|
|
89
89
|
: modelEntries.length === 0
|
|
90
|
-
? html`<p class="text-xs text-
|
|
90
|
+
? html`<p class="text-xs text-fg-muted">
|
|
91
91
|
No authorized models available yet. Add one from the Models tab
|
|
92
92
|
first.
|
|
93
93
|
</p>`
|
|
@@ -100,7 +100,7 @@ export const AgentModelCard = ({
|
|
|
100
100
|
class="flex items-center justify-between py-1"
|
|
101
101
|
>
|
|
102
102
|
<div class="flex items-center gap-2 min-w-0">
|
|
103
|
-
<span class="text-sm text-
|
|
103
|
+
<span class="text-sm text-body truncate">
|
|
104
104
|
${getModelDisplayLabel(entry)}
|
|
105
105
|
</span>
|
|
106
106
|
${entry.key === effectiveModel
|
|
@@ -109,7 +109,7 @@ export const AgentModelCard = ({
|
|
|
109
109
|
<button
|
|
110
110
|
type="button"
|
|
111
111
|
onclick=${() => handleSelectModel(entry.key)}
|
|
112
|
-
class="text-xs px-2 py-0.5 rounded-full text-
|
|
112
|
+
class="text-xs px-2 py-0.5 rounded-full text-fg-muted hover:text-body hover:bg-surface"
|
|
113
113
|
>
|
|
114
114
|
Set primary
|
|
115
115
|
</button>
|
|
@@ -139,13 +139,13 @@ export const AgentModelCard = ({
|
|
|
139
139
|
/>
|
|
140
140
|
${authorizedModelOptions.length === 0
|
|
141
141
|
? html`
|
|
142
|
-
<p class="text-xs text-
|
|
142
|
+
<p class="text-xs text-fg-muted">
|
|
143
143
|
Add and authorize models from the Models tab before
|
|
144
144
|
assigning one here.
|
|
145
145
|
</p>
|
|
146
146
|
`
|
|
147
147
|
: html`
|
|
148
|
-
<p class="text-xs text-
|
|
148
|
+
<p class="text-xs text-fg-muted">
|
|
149
149
|
Only models that already have working auth are
|
|
150
150
|
available here.
|
|
151
151
|
</p>
|
|
@@ -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 { kProfileLabels } from "../agent-tools/tool-catalog.js";
|
|
4
4
|
|
|
5
5
|
const html = htm.bind(h);
|
|
@@ -16,7 +16,7 @@ export const AgentToolsCard = ({
|
|
|
16
16
|
<div class="bg-surface border border-border rounded-xl p-4">
|
|
17
17
|
<h2 class="card-label mb-3">Tools</h2>
|
|
18
18
|
<div
|
|
19
|
-
class="flex items-center justify-between gap-3 cursor-pointer hover:bg-
|
|
19
|
+
class="flex items-center justify-between gap-3 cursor-pointer hover:bg-surface -mx-2 px-2 py-1.5 rounded-lg transition-colors"
|
|
20
20
|
role="button"
|
|
21
21
|
tabindex="0"
|
|
22
22
|
onclick=${onSwitchToTools}
|
|
@@ -29,7 +29,7 @@ export const AgentToolsCard = ({
|
|
|
29
29
|
>
|
|
30
30
|
<span class="font-medium text-sm">${profileLabel}</span>
|
|
31
31
|
<span class="flex items-center gap-2 shrink-0">
|
|
32
|
-
<span class="text-xs text-
|
|
32
|
+
<span class="text-xs text-fg-muted">
|
|
33
33
|
${enabledCount}/${totalCount} enabled
|
|
34
34
|
</span>
|
|
35
35
|
<svg
|
|
@@ -37,7 +37,7 @@ export const AgentToolsCard = ({
|
|
|
37
37
|
height="14"
|
|
38
38
|
viewBox="0 0 16 16"
|
|
39
39
|
fill="none"
|
|
40
|
-
class="text-
|
|
40
|
+
class="text-fg-dim"
|
|
41
41
|
>
|
|
42
42
|
<path
|
|
43
43
|
d="M6 3.5L10.5 8L6 12.5"
|
|
@@ -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 { formatBytes } from "../../../lib/format.js";
|
|
4
4
|
import { useWorkspaceCard } from "./use-workspace-card.js";
|
|
5
5
|
|
|
@@ -30,7 +30,7 @@ export const WorkspaceCard = ({
|
|
|
30
30
|
>
|
|
31
31
|
${agent.workspace}
|
|
32
32
|
</button>
|
|
33
|
-
<div class="text-xs text-
|
|
33
|
+
<div class="text-xs text-fg-muted md:shrink-0 md:text-right">
|
|
34
34
|
${loadingWorkspaceSize
|
|
35
35
|
? "Calculating size..."
|
|
36
36
|
: workspaceSizeBytes != null
|
|
@@ -41,7 +41,7 @@ export const WorkspaceCard = ({
|
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
`
|
|
44
|
-
: html`<p class="text-sm text-
|
|
44
|
+
: html`<p class="text-sm text-fg-muted">No workspace configured</p>`}
|
|
45
45
|
</div>
|
|
46
46
|
`;
|
|
47
47
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { h } from "
|
|
1
|
+
import { h } from "preact";
|
|
2
2
|
import {
|
|
3
3
|
useCallback,
|
|
4
4
|
useEffect,
|
|
5
5
|
useMemo,
|
|
6
6
|
useRef,
|
|
7
7
|
useState,
|
|
8
|
-
} from "
|
|
9
|
-
import htm from "
|
|
8
|
+
} from "preact/hooks";
|
|
9
|
+
import htm from "htm";
|
|
10
10
|
import { Pairings } from "../pairings.js";
|
|
11
11
|
import { usePolling } from "../../hooks/usePolling.js";
|
|
12
12
|
import {
|
|
@@ -293,7 +293,7 @@ export const AgentPairingSection = ({ agent = {} }) => {
|
|
|
293
293
|
return html`
|
|
294
294
|
<div class="bg-surface border border-border rounded-xl p-4">
|
|
295
295
|
<h3 class="card-label mb-3">Pairing</h3>
|
|
296
|
-
<p class="text-sm text-
|
|
296
|
+
<p class="text-sm text-fg-muted">Loading pairing status...</p>
|
|
297
297
|
</div>
|
|
298
298
|
`;
|
|
299
299
|
}
|
|
@@ -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 { ToggleSwitch } from "../../toggle-switch.js";
|
|
4
4
|
import { InfoTooltip } from "../../info-tooltip.js";
|
|
5
5
|
import { SegmentedControl } from "../../segmented-control.js";
|
|
@@ -23,13 +23,13 @@ const kProfileOptions = kToolProfiles.map((p) => ({
|
|
|
23
23
|
const ToolRow = ({ tool, onToggle }) => html`
|
|
24
24
|
<div class="flex items-center justify-between gap-3 py-2.5 px-4">
|
|
25
25
|
<div class="min-w-0">
|
|
26
|
-
<div class="text-sm text-
|
|
26
|
+
<div class="text-sm text-body flex items-center gap-1.5">
|
|
27
27
|
<span>${tool.label}</span>
|
|
28
28
|
${tool.help
|
|
29
29
|
? html`<${InfoTooltip} text=${tool.help} widthClass="w-72" />`
|
|
30
30
|
: null}
|
|
31
31
|
</div>
|
|
32
|
-
<span class="text-xs font-mono text-
|
|
32
|
+
<span class="text-xs font-mono text-fg-muted">${tool.id}</span>
|
|
33
33
|
</div>
|
|
34
34
|
<${ToggleSwitch}
|
|
35
35
|
checked=${tool.enabled}
|
|
@@ -72,7 +72,7 @@ export const AgentToolsPanel = ({ agent = {}, tools = {} }) => {
|
|
|
72
72
|
<div>
|
|
73
73
|
<div class="flex items-center justify-between mb-3">
|
|
74
74
|
<h3 class="card-label text-xs">Preset</h3>
|
|
75
|
-
<span class="text-xs text-
|
|
75
|
+
<span class="text-xs text-fg-muted"
|
|
76
76
|
>${enabledTotal}/${totalTools} tools enabled</span
|
|
77
77
|
>
|
|
78
78
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from "
|
|
2
|
-
import { useEffect, useMemo, useState } from "
|
|
3
|
-
import htm from "
|
|
1
|
+
import { h } from "preact";
|
|
2
|
+
import { useEffect, useMemo, useState } from "preact/hooks";
|
|
3
|
+
import htm from "htm";
|
|
4
4
|
import { ActionButton } from "../action-button.js";
|
|
5
5
|
import { CloseIcon } from "../icons.js";
|
|
6
6
|
import { ModalShell } from "../modal-shell.js";
|
|
@@ -112,25 +112,25 @@ export const CreateAgentModal = ({
|
|
|
112
112
|
class="h-8 w-8 inline-flex items-center justify-center rounded-lg ac-btn-secondary"
|
|
113
113
|
aria-label="Close modal"
|
|
114
114
|
>
|
|
115
|
-
<${CloseIcon} className="w-3.5 h-3.5 text-
|
|
115
|
+
<${CloseIcon} className="w-3.5 h-3.5 text-body" />
|
|
116
116
|
</button>
|
|
117
117
|
`}
|
|
118
118
|
/>
|
|
119
119
|
|
|
120
120
|
<div class="space-y-3">
|
|
121
121
|
<label class="block space-y-1">
|
|
122
|
-
<span class="text-xs text-
|
|
122
|
+
<span class="text-xs text-fg-muted">Display name</span>
|
|
123
123
|
<input
|
|
124
124
|
type="text"
|
|
125
125
|
value=${displayName}
|
|
126
126
|
onInput=${(event) => setDisplayName(event.target.value)}
|
|
127
127
|
placeholder="Ops Agent"
|
|
128
|
-
class="w-full bg-
|
|
128
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm text-body outline-none focus:border-fg-muted"
|
|
129
129
|
/>
|
|
130
130
|
</label>
|
|
131
131
|
|
|
132
132
|
<label class="block space-y-1">
|
|
133
|
-
<span class="text-xs text-
|
|
133
|
+
<span class="text-xs text-fg-muted">Agent ID</span>
|
|
134
134
|
<input
|
|
135
135
|
type="text"
|
|
136
136
|
value=${agentId}
|
|
@@ -139,14 +139,14 @@ export const CreateAgentModal = ({
|
|
|
139
139
|
setAgentId(slugifyAgentId(event.target.value));
|
|
140
140
|
}}
|
|
141
141
|
placeholder="ops-agent"
|
|
142
|
-
class="w-full bg-
|
|
142
|
+
class="w-full bg-field border border-border rounded-lg px-3 py-2 text-sm font-mono text-body outline-none focus:border-fg-muted"
|
|
143
143
|
/>
|
|
144
144
|
</label>
|
|
145
145
|
|
|
146
146
|
<label class="block space-y-1">
|
|
147
|
-
<span class="text-xs text-
|
|
148
|
-
<div class="flex items-center bg-
|
|
149
|
-
<span class="px-3 py-2 text-xs font-mono text-
|
|
147
|
+
<span class="text-xs text-fg-muted">Workspace folder</span>
|
|
148
|
+
<div class="flex items-center bg-field border border-border rounded-lg focus-within:border-fg-muted">
|
|
149
|
+
<span class="px-3 py-2 text-xs font-mono text-fg-muted border-r border-border">
|
|
150
150
|
.openclaw/workspace-
|
|
151
151
|
</span>
|
|
152
152
|
<input
|
|
@@ -157,12 +157,12 @@ export const CreateAgentModal = ({
|
|
|
157
157
|
setWorkspaceSuffix(slugifyAgentId(event.target.value));
|
|
158
158
|
}}
|
|
159
159
|
placeholder="ops-agent"
|
|
160
|
-
class="flex-1 bg-transparent px-3 py-2 text-sm font-mono text-
|
|
160
|
+
class="flex-1 bg-transparent px-3 py-2 text-sm font-mono text-body outline-none"
|
|
161
161
|
/>
|
|
162
162
|
</div>
|
|
163
163
|
</label>
|
|
164
164
|
|
|
165
|
-
${error ? html`<p class="text-xs text-
|
|
165
|
+
${error ? html`<p class="text-xs text-status-error-muted">${error}</p>` : null}
|
|
166
166
|
</div>
|
|
167
167
|
|
|
168
168
|
<div class="flex justify-end gap-2 pt-1">
|