@shepai/cli 1.92.1-pr278.546c1d4 → 1.92.1-pr278.e659c75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.js +25 -25
- package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +24 -24
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +24 -24
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +19 -19
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +24 -24
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +24 -24
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +17 -17
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_002ab1c0.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_002ab1c0.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_1bab40be.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_1bab40be.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__22751bba._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__22751bba._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31fc8960._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__31fc8960._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9497d008._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9497d008._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e630cc47._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e630cc47._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fb487740._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fb487740._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_12259d8f._.js +3 -0
- package/web/.next/server/chunks/ssr/_12259d8f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_135edb9c._.js +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_25e25a5c._.js +3 -0
- package/web/.next/server/chunks/ssr/_25e25a5c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0d3964ca._.js → _42d717e9._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_0d3964ca._.js.map → _42d717e9._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_3a8fc63d._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_3a8fc63d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1695630c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_1695630c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f16e6874._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_f16e6874._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +29 -29
- package/web/.next/static/chunks/{3fd14ab34d58631e.js → 1204eca6bcfa0d91.js} +1 -1
- package/web/.next/static/chunks/22ce70698a96441b.js +1 -0
- package/web/.next/static/chunks/37b4993507880f84.css +2 -0
- package/web/.next/static/chunks/{137b4e745802b672.js → 5ec5b2d125fcf404.js} +1 -1
- package/web/.next/static/chunks/{8925d8a2e9bc3cb0.js → 76d20d5cc5750310.js} +1 -1
- package/web/.next/static/chunks/7b3210ed80a750a4.js +1 -0
- package/web/.next/static/chunks/{69b188357d9bba01.js → 82bc40eb13750b22.js} +1 -1
- package/web/.next/static/chunks/{b6a5b8dc5b9651b2.js → 857b67d726d491be.js} +1 -1
- package/web/.next/static/chunks/{f4e414fd51a7640b.js → 980d70fe7dd93db1.js} +1 -1
- package/web/.next/static/chunks/9e64c6e926a5fc72.js +1 -0
- package/web/.next/static/chunks/{3872f739442d2f9d.js → b9aa44f4ae7cff2c.js} +1 -1
- package/web/.next/static/chunks/{fc2befcfcd1a5b72.js → d517923e1f743a20.js} +1 -1
- package/web/.next/server/chunks/ssr/_7dac1c7f._.js +0 -3
- package/web/.next/server/chunks/ssr/_7dac1c7f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_8dfa5290._.js +0 -3
- package/web/.next/server/chunks/ssr/_8dfa5290._.js.map +0 -1
- package/web/.next/static/chunks/963c8c19873104c6.js +0 -1
- package/web/.next/static/chunks/a1008ec2a7af77ce.js +0 -1
- package/web/.next/static/chunks/e92dd6b099ceebdc.css +0 -2
- package/web/.next/static/chunks/f97c89177e996e7f.js +0 -1
- /package/web/.next/static/{oEas8MDXQGNfKej8Xjoyv → xI3YfrsT7xbsvGfXX5Uy2}/_buildManifest.js +0 -0
- /package/web/.next/static/{oEas8MDXQGNfKej8Xjoyv → xI3YfrsT7xbsvGfXX5Uy2}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{oEas8MDXQGNfKej8Xjoyv → xI3YfrsT7xbsvGfXX5Uy2}/_ssgManifest.js +0 -0
package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"welcome-agent-setup.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/welcome-agent-setup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"welcome-agent-setup.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/welcome-agent-setup.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,iBAAiB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CA8MlF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useCallback } from 'react';
|
|
4
|
-
import { Check, ChevronRight, ChevronLeft, Download, Loader2, CheckCircle2, Circle, AlertCircle,
|
|
4
|
+
import { Check, ChevronRight, ChevronLeft, Download, Loader2, CheckCircle2, Circle, AlertCircle, } from 'lucide-react';
|
|
5
5
|
import { getAllAgentModels } from '../../../app/actions/get-all-agent-models.js';
|
|
6
6
|
import { checkAgentTool } from '../../../app/actions/check-agent-tool.js';
|
|
7
7
|
import { updateAgentAndModel } from '../../../app/actions/update-agent-and-model.js';
|
|
@@ -79,37 +79,37 @@ export function WelcomeAgentSetup({ onComplete, className }) {
|
|
|
79
79
|
}
|
|
80
80
|
}, [selectedAgent, selectedModel, onComplete]);
|
|
81
81
|
if (loading) {
|
|
82
|
-
return (_jsxs("div", { "data-testid": "welcome-agent-setup", className: cn('flex flex-col items-center justify-center gap-3', className), children: [_jsx(Loader2, { className: "text-muted-foreground h-5 w-5 animate-spin" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Loading agents..." })] }));
|
|
82
|
+
return (_jsxs("div", { "data-testid": "welcome-agent-setup", className: cn('bg-card flex flex-col items-center justify-center gap-3 rounded-xl border p-8', className), children: [_jsx(Loader2, { className: "text-muted-foreground h-5 w-5 animate-spin" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Loading agents..." })] }));
|
|
83
83
|
}
|
|
84
|
-
return (_jsxs("div", { "data-testid": "welcome-agent-setup", className: cn('
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
84
|
+
return (_jsxs("div", { "data-testid": "welcome-agent-setup", className: cn('bg-card w-full max-w-md rounded-xl border shadow-sm', className), children: [_jsxs("div", { className: "border-b px-5 py-4", children: [_jsx("h2", { className: "text-sm font-bold", children: "Set up your AI agent" }), _jsxs("p", { className: "text-muted-foreground mt-0.5 text-xs", children: [step === 'select-agent' && 'Choose the coding agent you want to use', step === 'select-model' && 'Pick a model for your agent', step === 'check-tool' && 'Verifying tool availability'] }), _jsx("div", { className: "mt-3 flex items-center gap-1.5", children: ['select-agent', 'select-model', 'check-tool'].map((s, i) => (_jsx("div", { className: cn('h-1 flex-1 rounded-full transition-colors', i <= ['select-agent', 'select-model', 'check-tool'].indexOf(step)
|
|
85
|
+
? 'bg-primary'
|
|
86
|
+
: 'bg-muted') }, s))) })] }), _jsxs("div", { className: "p-2", children: [step === 'select-agent' && (_jsx("div", { "data-testid": "agent-list", children: groups.map((group) => {
|
|
87
|
+
const GroupIcon = getAgentTypeIcon(group.agentType);
|
|
88
|
+
return (_jsxs("button", { type: "button", "data-testid": `agent-option-${group.agentType}`, className: "hover:bg-accent flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors", onClick: () => handleAgentSelect(group.agentType), children: [_jsx(GroupIcon, { className: "h-5 w-5 shrink-0" }), _jsxs("div", { className: "flex-1", children: [_jsx("span", { className: "text-sm font-medium", children: group.label }), group.models.length > 0 && (_jsxs("span", { className: "text-muted-foreground ml-1.5 text-xs", children: [group.models.length, " model", group.models.length !== 1 ? 's' : ''] }))] }), _jsx(ChevronRight, { className: "text-muted-foreground h-4 w-4" })] }, group.agentType));
|
|
89
|
+
}) })), step === 'select-model' && activeGroup ? (_jsxs("div", { "data-testid": "model-list", children: [_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground mb-1 flex w-full cursor-pointer items-center gap-1.5 px-3 py-1.5 text-xs font-medium transition-colors", onClick: handleBack, children: [_jsx(ChevronLeft, { className: "h-3.5 w-3.5" }), "Back to agents"] }), activeGroup.models.map((m) => {
|
|
90
|
+
const meta = getModelMeta(m.id);
|
|
91
|
+
return (_jsxs("button", { type: "button", "data-testid": `model-option-${m.id}`, className: "hover:bg-accent flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors", onClick: () => handleModelSelect(m.id), children: [_jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "text-sm font-medium", children: meta.displayName || m.displayName }), _jsx("span", { className: "text-muted-foreground text-xs", children: meta.description || m.description })] }), _jsx(ChevronRight, { className: "text-muted-foreground h-3.5 w-3.5" })] }, m.id));
|
|
92
|
+
})] })) : null, step === 'check-tool' && (_jsx(ToolCheckStep, { toolStatus: toolStatus, checking: checkingTool, saving: saving, onConfirm: handleConfirm, onBack: handleBack, onToolInstalled: () => {
|
|
93
|
+
// Re-check tool after install
|
|
94
|
+
if (selectedAgent) {
|
|
95
|
+
setCheckingTool(true);
|
|
96
|
+
checkAgentTool(selectedAgent)
|
|
97
|
+
.then(setToolStatus)
|
|
98
|
+
.finally(() => setCheckingTool(false));
|
|
99
|
+
}
|
|
100
|
+
} }))] })] }));
|
|
101
101
|
}
|
|
102
102
|
/** Sub-component for the tool verification step */
|
|
103
103
|
function ToolCheckStep({ toolStatus, checking, saving, onConfirm, onBack, onToolInstalled, }) {
|
|
104
104
|
if (checking || !toolStatus) {
|
|
105
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 py-
|
|
105
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-6", children: [_jsx(Loader2, { className: "text-muted-foreground h-5 w-5 animate-spin" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Checking tool availability..." })] }));
|
|
106
106
|
}
|
|
107
107
|
// Agent doesn't require a tool (e.g., dev/demo)
|
|
108
108
|
if (!toolStatus.toolId) {
|
|
109
|
-
return (_jsxs("div", { className: "flex flex-col
|
|
109
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 px-3 py-4", children: [_jsxs("div", { className: "flex items-center gap-2 text-emerald-600 dark:text-emerald-400", children: [_jsx(CheckCircle2, { className: "h-4 w-4" }), _jsx("span", { className: "text-sm font-medium", children: "No additional tools required" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors", onClick: onBack, children: [_jsx(ChevronLeft, { className: "mr-0.5 inline h-3.5 w-3.5" }), "Back"] }), _jsxs("button", { type: "button", "data-testid": "agent-setup-confirm", disabled: saving, className: "bg-primary text-primary-foreground hover:bg-primary/90 ml-auto flex cursor-pointer items-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors disabled:opacity-60", onClick: onConfirm, children: [saving ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Check, { className: "h-3.5 w-3.5" })), "Continue"] })] })] }));
|
|
110
110
|
}
|
|
111
111
|
if (toolStatus.installed) {
|
|
112
|
-
return (_jsxs("div", { className: "flex flex-col
|
|
112
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 px-3 py-4", children: [_jsxs("div", { className: "flex items-center gap-2 text-emerald-600 dark:text-emerald-400", children: [_jsx(CheckCircle2, { className: "h-4 w-4" }), _jsxs("span", { className: "text-sm font-medium", children: [toolStatus.tool?.name ?? toolStatus.toolId, " is installed"] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors", onClick: onBack, children: [_jsx(ChevronLeft, { className: "mr-0.5 inline h-3.5 w-3.5" }), "Back"] }), _jsxs("button", { type: "button", "data-testid": "agent-setup-confirm", disabled: saving, className: "bg-primary text-primary-foreground hover:bg-primary/90 ml-auto flex cursor-pointer items-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors disabled:opacity-60", onClick: onConfirm, children: [saving ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Check, { className: "h-3.5 w-3.5" })), "Continue"] })] })] }));
|
|
113
113
|
}
|
|
114
114
|
// Tool not installed — show install option
|
|
115
115
|
return (_jsx(ToolInstallInline, { toolStatus: toolStatus, saving: saving, onConfirm: onConfirm, onBack: onBack, onInstalled: onToolInstalled }));
|
|
@@ -125,11 +125,11 @@ function ToolInstallInline({ toolStatus, saving, onConfirm, onBack, onInstalled,
|
|
|
125
125
|
onInstalled();
|
|
126
126
|
}
|
|
127
127
|
}, [isInstallDone, onInstalled]);
|
|
128
|
-
return (_jsxs("div", { className: "flex flex-col
|
|
128
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 px-3 py-4", children: [_jsxs("div", { className: "flex items-center gap-2", children: [isInstallDone ? (_jsx(CheckCircle2, { className: "h-4 w-4 text-emerald-600 dark:text-emerald-400" })) : isInstallError ? (_jsx(AlertCircle, { className: "h-4 w-4 text-red-500" })) : (_jsx(Circle, { className: "text-muted-foreground h-4 w-4" })), _jsxs("span", { className: "text-sm font-medium", children: [toolStatus.tool?.name ?? toolId, ' ', isInstallDone
|
|
129
129
|
? 'installed successfully'
|
|
130
130
|
: isInstallError
|
|
131
131
|
? 'installation failed'
|
|
132
|
-
: 'is not installed'] })] }), toolStatus.tool?.installCommand && status === 'idle' ? (_jsxs("div", { className: "
|
|
132
|
+
: 'is not installed'] })] }), toolStatus.tool?.installCommand && status === 'idle' ? (_jsxs("div", { className: "rounded-md bg-zinc-900 px-3 py-2 font-mono text-xs text-zinc-100", children: [_jsx("span", { className: "text-zinc-500 select-none", children: "$ " }), toolStatus.tool.installCommand] })) : null, (status === 'streaming' || isInstallDone || isInstallError) && logs.length > 0 ? (_jsxs("div", { className: "max-h-32 overflow-auto rounded-md bg-zinc-900 p-2 font-mono text-[11px] leading-relaxed text-zinc-300", children: [logs.map((line, idx) => (
|
|
133
133
|
// eslint-disable-next-line react/no-array-index-key -- logs are append-only, never reorder
|
|
134
|
-
_jsx("div", { className: "break-all whitespace-pre-wrap", children: line }, idx))), isInstallDone ? (_jsx("div", { className: "mt-1 text-emerald-400", children: "Installation complete" })) : null, isInstallError ? (_jsx("div", { className: "mt-1 text-red-400", children: "Installation failed \u2014 try installing manually" })) : null] })) : null, _jsxs("div", { className: "flex items-center gap-
|
|
134
|
+
_jsx("div", { className: "break-all whitespace-pre-wrap", children: line }, idx))), isInstallDone ? (_jsx("div", { className: "mt-1 text-emerald-400", children: "Installation complete" })) : null, isInstallError ? (_jsx("div", { className: "mt-1 text-red-400", children: "Installation failed \u2014 try installing manually" })) : null] })) : null, _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("button", { type: "button", className: "text-muted-foreground hover:text-foreground cursor-pointer text-xs transition-colors", onClick: onBack, children: [_jsx(ChevronLeft, { className: "mr-0.5 inline h-3.5 w-3.5" }), "Back"] }), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [!isInstallDone && toolStatus.tool?.autoInstall ? (_jsxs("button", { type: "button", "data-testid": "agent-setup-install", disabled: status === 'streaming', className: "bg-primary text-primary-foreground hover:bg-primary/90 flex cursor-pointer items-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors disabled:opacity-60", onClick: startInstall, children: [status === 'streaming' ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Download, { className: "h-3.5 w-3.5" })), status === 'streaming' ? 'Installing...' : 'Install'] })) : null, isInstallDone ? (_jsxs("button", { type: "button", "data-testid": "agent-setup-confirm", disabled: saving, className: "bg-primary text-primary-foreground hover:bg-primary/90 flex cursor-pointer items-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors disabled:opacity-60", onClick: onConfirm, children: [saving ? (_jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(Check, { className: "h-3.5 w-3.5" })), "Continue"] })) : null] })] })] }));
|
|
135
135
|
}
|
package/dist/src/presentation/web/components/features/control-center/welcome-agent-setup.stories.js
CHANGED
|
@@ -9,7 +9,7 @@ const meta = {
|
|
|
9
9
|
layout: 'centered',
|
|
10
10
|
},
|
|
11
11
|
decorators: [
|
|
12
|
-
(Story) => (_jsx("div", { style: { width:
|
|
12
|
+
(Story) => (_jsx("div", { style: { width: 420, padding: 24 }, children: _jsx(Story, {}) })),
|
|
13
13
|
],
|
|
14
14
|
};
|
|
15
15
|
export default meta;
|