@mrpatronz/nexusflow 0.2.19 → 1.3.1
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 +37 -7
- package/dist/analyzers/index.d.ts +23 -0
- package/dist/analyzers/index.d.ts.map +1 -1
- package/dist/analyzers/index.js +62 -0
- package/dist/analyzers/index.js.map +1 -1
- package/dist/commands/add-repo.d.ts +9 -0
- package/dist/commands/add-repo.d.ts.map +1 -1
- package/dist/commands/add-repo.js +12 -1
- package/dist/commands/add-repo.js.map +1 -1
- package/dist/commands/add-repo.test.d.ts +2 -0
- package/dist/commands/add-repo.test.d.ts.map +1 -0
- package/dist/commands/add-repo.test.js +30 -0
- package/dist/commands/add-repo.test.js.map +1 -0
- package/dist/commands/commands.test.js +26 -6
- package/dist/commands/commands.test.js.map +1 -1
- package/dist/commands/commit.d.ts +7 -1
- package/dist/commands/commit.d.ts.map +1 -1
- package/dist/commands/commit.js +31 -8
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/commit.test.d.ts +2 -0
- package/dist/commands/commit.test.d.ts.map +1 -0
- package/dist/commands/commit.test.js +54 -0
- package/dist/commands/commit.test.js.map +1 -0
- package/dist/commands/diff.d.ts +9 -2
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +36 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +16 -20
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/handoff.d.ts.map +1 -1
- package/dist/commands/handoff.js +11 -15
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/refresh.d.ts +4 -2
- package/dist/commands/refresh.d.ts.map +1 -1
- package/dist/commands/refresh.js +20 -36
- package/dist/commands/refresh.js.map +1 -1
- package/dist/commands/schedule.d.ts +35 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +151 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +28 -7
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tui.js +1 -1
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/ui.d.ts +1 -0
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +5 -2
- package/dist/commands/ui.js.map +1 -1
- package/dist/core/adapters/local-storage.d.ts +7 -0
- package/dist/core/adapters/local-storage.d.ts.map +1 -1
- package/dist/core/adapters/local-storage.js +13 -4
- package/dist/core/adapters/local-storage.js.map +1 -1
- package/dist/core/adapters/storage.test.js +18 -0
- package/dist/core/adapters/storage.test.js.map +1 -1
- package/dist/core/analysis-cache.d.ts +58 -0
- package/dist/core/analysis-cache.d.ts.map +1 -0
- package/dist/core/analysis-cache.js +116 -0
- package/dist/core/analysis-cache.js.map +1 -0
- package/dist/core/analysis-cache.test.d.ts +2 -0
- package/dist/core/analysis-cache.test.d.ts.map +1 -0
- package/dist/core/analysis-cache.test.js +108 -0
- package/dist/core/analysis-cache.test.js.map +1 -0
- package/dist/core/refresh.d.ts +41 -0
- package/dist/core/refresh.d.ts.map +1 -0
- package/dist/core/refresh.js +56 -0
- package/dist/core/refresh.js.map +1 -0
- package/dist/core/scheduler.d.ts +117 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +361 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/scheduler.test.d.ts +2 -0
- package/dist/core/scheduler.test.d.ts.map +1 -0
- package/dist/core/scheduler.test.js +163 -0
- package/dist/core/scheduler.test.js.map +1 -0
- package/dist/core/sync.d.ts +6 -0
- package/dist/core/sync.d.ts.map +1 -1
- package/dist/core/sync.js +17 -12
- package/dist/core/sync.js.map +1 -1
- package/dist/core/workspace.d.ts +6 -0
- package/dist/core/workspace.d.ts.map +1 -1
- package/dist/core/workspace.js +32 -15
- package/dist/core/workspace.js.map +1 -1
- package/dist/core/workspace.test.d.ts +2 -0
- package/dist/core/workspace.test.d.ts.map +1 -0
- package/dist/core/workspace.test.js +42 -0
- package/dist/core/workspace.test.js.map +1 -0
- package/dist/generators/index.d.ts +7 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +14 -1
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/map-generator.d.ts.map +1 -1
- package/dist/generators/map-generator.js +4 -3
- package/dist/generators/map-generator.js.map +1 -1
- package/dist/generators/map-generator.test.js +4 -2
- package/dist/generators/map-generator.test.js.map +1 -1
- package/dist/gui/assets/index-ElroPpSP.js +26 -0
- package/dist/gui/index.html +1 -1
- package/dist/index.js +108 -4
- package/dist/index.js.map +1 -1
- package/dist/orchestration/index.d.ts +1 -1
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +1 -1
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/runner.d.ts +16 -1
- package/dist/orchestration/runner.d.ts.map +1 -1
- package/dist/orchestration/runner.js +41 -5
- package/dist/orchestration/runner.js.map +1 -1
- package/dist/orchestration/runner.test.d.ts +2 -0
- package/dist/orchestration/runner.test.d.ts.map +1 -0
- package/dist/orchestration/runner.test.js +71 -0
- package/dist/orchestration/runner.test.js.map +1 -0
- package/dist/server.d.ts +17 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +275 -114
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +158 -1
- package/dist/server.test.js.map +1 -1
- package/dist/utils/multi-git.d.ts +21 -0
- package/dist/utils/multi-git.d.ts.map +1 -1
- package/dist/utils/multi-git.js +40 -4
- package/dist/utils/multi-git.js.map +1 -1
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/prompts.js +8 -2
- package/dist/utils/prompts.js.map +1 -1
- package/package.json +13 -1
- package/.agents/skills/ccc/SKILL.md +0 -71
- package/.agents/skills/ccc/references/management.md +0 -110
- package/.agents/skills/ccc/references/settings.md +0 -126
- package/.github/dependabot.yml +0 -52
- package/.github/workflows/ci.yml +0 -44
- package/.github/workflows/dependabot-merge.yml +0 -53
- package/.github/workflows/release-desktop.yml +0 -67
- package/.github/workflows/release-npm.yml +0 -65
- package/.github/workflows/release-vscode.yml +0 -61
- package/.vscode/launch.json +0 -17
- package/.vscode/tasks.json +0 -17
- package/GETTING_STARTED.md +0 -114
- package/desktop/build-installer.js +0 -228
- package/desktop/build.js +0 -118
- package/desktop/installer/nexusflow.iss +0 -35
- package/desktop/neutralino.config.json +0 -39
- package/desktop/package-lock.json +0 -1060
- package/desktop/package.json +0 -14
- package/dist/gui/assets/index-D8iJPvnk.js +0 -26
- package/extension/media/icon.svg +0 -1
- package/extension/package-lock.json +0 -6044
- package/extension/package.json +0 -117
- package/extension/src/extension.ts +0 -653
- package/extension/tsconfig.json +0 -21
- package/gui/README.md +0 -73
- package/gui/e2e/dashboard.spec.ts +0 -61
- package/gui/e2e/wizard.spec.ts +0 -346
- package/gui/eslint.config.js +0 -26
- package/gui/index.html +0 -17
- package/gui/package-lock.json +0 -3137
- package/gui/package.json +0 -37
- package/gui/playwright.config.ts +0 -41
- package/gui/public/app_logo.png +0 -0
- package/gui/public/favicon.svg +0 -1
- package/gui/public/icons.svg +0 -24
- package/gui/src/App.css +0 -1
- package/gui/src/App.tsx +0 -3573
- package/gui/src/app/AppSidebar.tsx +0 -69
- package/gui/src/assets/hero.png +0 -0
- package/gui/src/assets/react.svg +0 -1
- package/gui/src/assets/vite.svg +0 -1
- package/gui/src/components/AddRepoPicker.tsx +0 -81
- package/gui/src/components/ui/Button.tsx +0 -40
- package/gui/src/components/ui/Card.tsx +0 -6
- package/gui/src/components/ui/EmptyState.tsx +0 -22
- package/gui/src/components/ui/Input.tsx +0 -21
- package/gui/src/components/ui/Menu.tsx +0 -71
- package/gui/src/components/ui/Modal.tsx +0 -39
- package/gui/src/components/ui/PageHeader.tsx +0 -21
- package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
- package/gui/src/components/ui/Skeleton.tsx +0 -5
- package/gui/src/components/ui/StatusPill.tsx +0 -36
- package/gui/src/components/ui/Tabs.tsx +0 -40
- package/gui/src/components/ui/cn.ts +0 -4
- package/gui/src/components/ui/index.ts +0 -16
- package/gui/src/features/changes/ChangesViewer.tsx +0 -388
- package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
- package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
- package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
- package/gui/src/features/services/ServiceConsole.tsx +0 -215
- package/gui/src/features/sessions/SessionHistory.tsx +0 -195
- package/gui/src/index.css +0 -167
- package/gui/src/lib/status.ts +0 -24
- package/gui/src/main.tsx +0 -94
- package/gui/src/pages/DashboardPage.tsx +0 -129
- package/gui/src/pages/WorkspacesPage.tsx +0 -352
- package/gui/src/types.ts +0 -81
- package/gui/tsconfig.app.json +0 -25
- package/gui/tsconfig.json +0 -7
- package/gui/tsconfig.node.json +0 -24
- package/gui/vite.config.ts +0 -12
- package/resources/workflows/plan-implement-review.md +0 -8
- package/resources/workflows/research-verify.md +0 -6
- package/resources/workflows/solo-developer.md +0 -3
- package/scripts/simulate-workspaces.ts +0 -55
- package/skills-lock.json +0 -11
- package/src/analyzers/detect-apis.ts +0 -290
- package/src/analyzers/detect-deps.ts +0 -315
- package/src/analyzers/detect-existing.ts +0 -74
- package/src/analyzers/detect-ports.ts +0 -110
- package/src/analyzers/index.ts +0 -97
- package/src/analyzers/messaging-analyzer.ts +0 -254
- package/src/analyzers/readme-summarizer.ts +0 -102
- package/src/analyzers/run-analyzer.ts +0 -269
- package/src/analyzers/tech-stack.ts +0 -283
- package/src/commands/adapter.ts +0 -348
- package/src/commands/add-repo.ts +0 -156
- package/src/commands/commands.test.ts +0 -156
- package/src/commands/commit.ts +0 -131
- package/src/commands/config.ts +0 -52
- package/src/commands/create.ts +0 -204
- package/src/commands/desktop.ts +0 -128
- package/src/commands/diff.ts +0 -125
- package/src/commands/doctor.ts +0 -370
- package/src/commands/handoff.ts +0 -266
- package/src/commands/init.ts +0 -134
- package/src/commands/list.ts +0 -46
- package/src/commands/logs.ts +0 -63
- package/src/commands/mcp.ts +0 -94
- package/src/commands/open.ts +0 -129
- package/src/commands/refresh.ts +0 -137
- package/src/commands/remove.ts +0 -98
- package/src/commands/start.ts +0 -117
- package/src/commands/status.ts +0 -54
- package/src/commands/stop.ts +0 -55
- package/src/commands/sync.ts +0 -125
- package/src/commands/tui.ts +0 -484
- package/src/commands/ui.ts +0 -111
- package/src/core/adapters/local-storage.ts +0 -66
- package/src/core/adapters/obsidian-storage.ts +0 -151
- package/src/core/adapters/registry.ts +0 -44
- package/src/core/adapters/storage.test.ts +0 -174
- package/src/core/adapters/vault-storage.ts +0 -86
- package/src/core/config.test.ts +0 -96
- package/src/core/config.ts +0 -140
- package/src/core/graph.ts +0 -344
- package/src/core/plugins/index.ts +0 -17
- package/src/core/plugins/loader.ts +0 -36
- package/src/core/ports/storage.ts +0 -71
- package/src/core/scanner.test.ts +0 -61
- package/src/core/scanner.ts +0 -91
- package/src/core/storage.ts +0 -37
- package/src/core/sync.ts +0 -121
- package/src/core/workspace-state.test.ts +0 -108
- package/src/core/workspace-state.ts +0 -130
- package/src/core/workspace.ts +0 -487
- package/src/core/worktree.ts +0 -120
- package/src/generators/antigravity.ts +0 -32
- package/src/generators/base.ts +0 -243
- package/src/generators/claude.ts +0 -34
- package/src/generators/codex.ts +0 -48
- package/src/generators/copilot.ts +0 -56
- package/src/generators/cursor.ts +0 -44
- package/src/generators/diff-context.ts +0 -75
- package/src/generators/index.ts +0 -322
- package/src/generators/map-generator.test.ts +0 -159
- package/src/generators/map-generator.ts +0 -539
- package/src/generators/plan-generator.ts +0 -483
- package/src/generators/skills-generator.ts +0 -259
- package/src/index.ts +0 -539
- package/src/mcp/server.ts +0 -338
- package/src/orchestration/detect.ts +0 -313
- package/src/orchestration/index.ts +0 -7
- package/src/orchestration/runner.ts +0 -283
- package/src/server.test.ts +0 -618
- package/src/server.ts +0 -1402
- package/src/types.ts +0 -451
- package/src/utils/detect-ai.test.ts +0 -44
- package/src/utils/detect-ai.ts +0 -84
- package/src/utils/detect-editors.test.ts +0 -48
- package/src/utils/detect-editors.ts +0 -57
- package/src/utils/git.test.ts +0 -74
- package/src/utils/git.ts +0 -117
- package/src/utils/local-ai.test.ts +0 -130
- package/src/utils/local-ai.ts +0 -116
- package/src/utils/multi-git.test.ts +0 -158
- package/src/utils/multi-git.ts +0 -405
- package/src/utils/prompts.ts +0 -209
- package/src/utils/session-finder.ts +0 -483
- package/src/utils/system-scanner.test.ts +0 -89
- package/src/utils/system-scanner.ts +0 -96
- package/src/utils/update-check.ts +0 -286
- package/src/utils/workflow-advisor.ts +0 -118
- package/src/utils/workflows.test.ts +0 -114
- package/src/utils/workflows.ts +0 -178
- package/tsconfig.json +0 -19
- package/vitest.config.ts +0 -14
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MessageSquareCode, RefreshCw, MessageSquare, Play, X, Copy } from 'lucide-react';
|
|
3
|
-
import type { Feature } from '../../types.js';
|
|
4
|
-
|
|
5
|
-
interface SessionHistoryProps {
|
|
6
|
-
ws: Feature;
|
|
7
|
-
sessions: any[];
|
|
8
|
-
sessionsLoading: boolean;
|
|
9
|
-
activeSession: any | null;
|
|
10
|
-
transcript: any[];
|
|
11
|
-
transcriptLoading: boolean;
|
|
12
|
-
workspaces: Feature[];
|
|
13
|
-
setActiveSession: (val: any | null) => void;
|
|
14
|
-
setTranscript: (val: any[]) => void;
|
|
15
|
-
fetchSessionTranscript: (assistant: string, sessionId: string) => Promise<void>;
|
|
16
|
-
handleResumeSession: (ws: Feature, sessionId?: string, assistant?: string) => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const SessionHistory: React.FC<SessionHistoryProps> = ({
|
|
20
|
-
ws,
|
|
21
|
-
sessions,
|
|
22
|
-
sessionsLoading,
|
|
23
|
-
activeSession,
|
|
24
|
-
transcript,
|
|
25
|
-
transcriptLoading,
|
|
26
|
-
workspaces,
|
|
27
|
-
setActiveSession,
|
|
28
|
-
setTranscript,
|
|
29
|
-
fetchSessionTranscript,
|
|
30
|
-
handleResumeSession,
|
|
31
|
-
}) => {
|
|
32
|
-
return (
|
|
33
|
-
<div>
|
|
34
|
-
{sessionsLoading ? (
|
|
35
|
-
<div className="flex justify-center py-10">
|
|
36
|
-
<RefreshCw className="animate-spin text-indigo-400" size={20} />
|
|
37
|
-
</div>
|
|
38
|
-
) : sessions.length === 0 ? (
|
|
39
|
-
<div className="text-center py-10 bg-gray-950/20 border border-gray-800/60 rounded-xl p-6">
|
|
40
|
-
<MessageSquareCode size={36} className="text-gray-650 mx-auto mb-3" />
|
|
41
|
-
<h4 className="text-sm font-bold text-gray-400 mb-1">No Past AI Sessions Found</h4>
|
|
42
|
-
<p className="text-xs text-gray-505 max-w-md mx-auto leading-relaxed">
|
|
43
|
-
Start a conversation with your AI assistant (e.g. running <code>claude</code>, <code>agy</code>, <code>codex</code>, or <code>copilot</code> inside this directory) to track session history here.
|
|
44
|
-
</p>
|
|
45
|
-
</div>
|
|
46
|
-
) : (
|
|
47
|
-
<div className="space-y-3 mb-6">
|
|
48
|
-
{sessions.map((sess) => (
|
|
49
|
-
<div key={sess.id} className="flex flex-col md:flex-row md:items-center justify-between gap-4 bg-gray-950/20 border border-gray-800/60 rounded-xl p-4 hover:border-gray-700/80 transition-all">
|
|
50
|
-
<div className="flex-1 min-w-0">
|
|
51
|
-
<div className="flex items-center gap-2.5 mb-1.5">
|
|
52
|
-
<span className={`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${
|
|
53
|
-
sess.assistant === 'antigravity' ? 'bg-indigo-500/20 text-indigo-300 border border-indigo-500/30' :
|
|
54
|
-
sess.assistant === 'claude' ? 'bg-amber-500/20 text-amber-300 border border-amber-500/30' :
|
|
55
|
-
sess.assistant === 'codex' ? 'bg-emerald-500/20 text-emerald-300 border border-emerald-500/30' :
|
|
56
|
-
'bg-sky-500/20 text-sky-300 border border-sky-500/30'
|
|
57
|
-
}`}>
|
|
58
|
-
{sess.assistant === 'antigravity' ? 'Antigravity' :
|
|
59
|
-
sess.assistant === 'claude' ? 'Claude Code' :
|
|
60
|
-
sess.assistant === 'codex' ? 'OpenAI Codex' : 'GitHub Copilot'}
|
|
61
|
-
</span>
|
|
62
|
-
<span className="text-[10px] text-gray-500">
|
|
63
|
-
Updated: {new Date(sess.updatedAt).toLocaleString()}
|
|
64
|
-
</span>
|
|
65
|
-
<span className="text-[10px] text-gray-500">•</span>
|
|
66
|
-
<span className="text-[10px] text-gray-550 font-medium">
|
|
67
|
-
{sess.messageCount} messages
|
|
68
|
-
</span>
|
|
69
|
-
</div>
|
|
70
|
-
<h4 className="text-xs font-semibold text-white truncate pr-4" title={sess.title}>
|
|
71
|
-
{sess.title}
|
|
72
|
-
</h4>
|
|
73
|
-
</div>
|
|
74
|
-
<div className="flex items-center gap-2 shrink-0">
|
|
75
|
-
<button
|
|
76
|
-
className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 bg-indigo-500/10 border border-indigo-500/20 hover:bg-indigo-500/20 text-indigo-300 rounded-lg text-xs font-bold transition-all cursor-pointer"
|
|
77
|
-
onClick={() => {
|
|
78
|
-
setActiveSession(sess);
|
|
79
|
-
setTranscript([]);
|
|
80
|
-
fetchSessionTranscript(sess.assistant, sess.id);
|
|
81
|
-
}}
|
|
82
|
-
>
|
|
83
|
-
<MessageSquare size={13} /> View Chat Log
|
|
84
|
-
</button>
|
|
85
|
-
<button
|
|
86
|
-
className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg text-xs font-bold transition-all cursor-pointer"
|
|
87
|
-
onClick={() => handleResumeSession(ws, sess.id, sess.assistant)}
|
|
88
|
-
>
|
|
89
|
-
<Play size={11} /> Resume
|
|
90
|
-
</button>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
))}
|
|
94
|
-
</div>
|
|
95
|
-
)}
|
|
96
|
-
|
|
97
|
-
{/* Transcript Modal Overlay */}
|
|
98
|
-
{activeSession && (
|
|
99
|
-
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/75 backdrop-blur-sm p-4">
|
|
100
|
-
<div className="bg-[#0b0f19] border border-gray-800 rounded-2xl w-full max-w-4xl h-[80vh] flex flex-col shadow-2xl overflow-hidden">
|
|
101
|
-
{/* Modal Header */}
|
|
102
|
-
<div className="flex items-center justify-between px-6 py-4 border-b border-gray-800 bg-gray-950/40">
|
|
103
|
-
<div>
|
|
104
|
-
<div className="flex items-center gap-2 mb-1">
|
|
105
|
-
<span className={`px-2 py-0.5 rounded text-[10px] font-bold uppercase tracking-wider ${
|
|
106
|
-
activeSession.assistant === 'antigravity' ? 'bg-indigo-500/20 text-indigo-300 border border-indigo-500/30' :
|
|
107
|
-
activeSession.assistant === 'claude' ? 'bg-amber-500/20 text-amber-300 border border-amber-500/30' :
|
|
108
|
-
activeSession.assistant === 'codex' ? 'bg-emerald-500/20 text-emerald-300 border border-emerald-500/30' :
|
|
109
|
-
'bg-sky-500/20 text-sky-300 border border-sky-500/30'
|
|
110
|
-
}`}>
|
|
111
|
-
{activeSession.assistant === 'antigravity' ? 'Antigravity' :
|
|
112
|
-
activeSession.assistant === 'claude' ? 'Claude Code' :
|
|
113
|
-
activeSession.assistant === 'codex' ? 'OpenAI Codex' : 'GitHub Copilot'}
|
|
114
|
-
</span>
|
|
115
|
-
<span className="text-[10px] text-gray-500">Session: {activeSession.id}</span>
|
|
116
|
-
</div>
|
|
117
|
-
<h3 className="text-sm font-bold text-white truncate max-w-xl" title={activeSession.title}>
|
|
118
|
-
{activeSession.title}
|
|
119
|
-
</h3>
|
|
120
|
-
</div>
|
|
121
|
-
<button
|
|
122
|
-
className="text-gray-400 hover:text-white p-2 hover:bg-gray-800/80 rounded-lg transition-colors cursor-pointer"
|
|
123
|
-
onClick={() => setActiveSession(null)}
|
|
124
|
-
>
|
|
125
|
-
<X size={18} />
|
|
126
|
-
</button>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
{/* Modal Body / Chat Messages */}
|
|
130
|
-
<div className="flex-1 overflow-y-auto p-6 space-y-4 bg-gray-950/10">
|
|
131
|
-
{transcriptLoading ? (
|
|
132
|
-
<div className="flex flex-col items-center justify-center h-full gap-2">
|
|
133
|
-
<RefreshCw className="animate-spin text-indigo-400" size={24} />
|
|
134
|
-
<span className="text-xs text-gray-505 font-medium">Loading conversation history...</span>
|
|
135
|
-
</div>
|
|
136
|
-
) : transcript.length === 0 ? (
|
|
137
|
-
<div className="flex items-center justify-center h-full text-xs text-gray-505">
|
|
138
|
-
No messages found in this transcript.
|
|
139
|
-
</div>
|
|
140
|
-
) : (
|
|
141
|
-
transcript.map((msg, idx) => (
|
|
142
|
-
<div key={idx} className={`flex flex-col ${msg.role === 'user' ? 'items-end' : 'items-start'}`}>
|
|
143
|
-
<div className="text-[10px] text-gray-500 mb-1 px-1">
|
|
144
|
-
{msg.role === 'user' ? 'Developer' : activeSession.assistant === 'antigravity' ? 'Antigravity' : activeSession.assistant === 'claude' ? 'Claude' : activeSession.assistant === 'codex' ? 'Codex' : 'Copilot'}
|
|
145
|
-
{msg.timestamp && ` • ${new Date(msg.timestamp).toLocaleTimeString()}`}
|
|
146
|
-
</div>
|
|
147
|
-
<div className={`max-w-[85%] rounded-2xl px-4 py-3 text-xs leading-relaxed whitespace-pre-wrap ${
|
|
148
|
-
msg.role === 'user'
|
|
149
|
-
? 'bg-indigo-650 text-white rounded-tr-none shadow-md border border-indigo-500/10'
|
|
150
|
-
: 'bg-gray-900 border border-gray-800 text-gray-200 rounded-tl-none shadow-sm font-sans'
|
|
151
|
-
}`}>
|
|
152
|
-
{msg.content}
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
))
|
|
156
|
-
)}
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
{/* Modal Footer */}
|
|
160
|
-
<div className="px-6 py-4 border-t border-gray-800 bg-gray-950/40 flex justify-between items-center">
|
|
161
|
-
<span className="text-[11px] text-gray-550">
|
|
162
|
-
Resuming will copy the shell command and open your code editor.
|
|
163
|
-
</span>
|
|
164
|
-
<div className="flex gap-2">
|
|
165
|
-
<button
|
|
166
|
-
className="inline-flex items-center justify-center gap-1.5 px-4 py-2 bg-gray-900 border border-gray-800 hover:bg-gray-800 rounded-lg text-xs font-bold text-white transition-all cursor-pointer"
|
|
167
|
-
onClick={() => {
|
|
168
|
-
const cmd = activeSession.assistant === 'antigravity' ? `agy --conversation ${activeSession.id}` :
|
|
169
|
-
activeSession.assistant === 'claude' ? `claude --resume ${activeSession.id}` :
|
|
170
|
-
activeSession.assistant === 'codex' ? `codex resume ${activeSession.id}` :
|
|
171
|
-
`copilot --resume ${activeSession.id}`;
|
|
172
|
-
navigator.clipboard.writeText(cmd);
|
|
173
|
-
alert(`Copied run command to clipboard:\n\n${cmd}`);
|
|
174
|
-
}}
|
|
175
|
-
>
|
|
176
|
-
<Copy size={13} /> Copy Resume Command
|
|
177
|
-
</button>
|
|
178
|
-
<button
|
|
179
|
-
className="inline-flex items-center justify-center gap-1.5 px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white rounded-lg text-xs font-bold transition-all cursor-pointer"
|
|
180
|
-
onClick={() => {
|
|
181
|
-
const matchedWs = workspaces.find(w => w.branchName === activeSession.workspacePath.split(/[\\/]/).pop());
|
|
182
|
-
handleResumeSession(matchedWs || workspaces[0], activeSession.id, activeSession.assistant);
|
|
183
|
-
setActiveSession(null);
|
|
184
|
-
}}
|
|
185
|
-
>
|
|
186
|
-
<Play size={12} /> Resume Conversation
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
)}
|
|
193
|
-
</div>
|
|
194
|
-
);
|
|
195
|
-
};
|
package/gui/src/index.css
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');
|
|
2
|
-
@import "tailwindcss";
|
|
3
|
-
|
|
4
|
-
/* ─── Design tokens ───────────────────────────────────────────────────────────
|
|
5
|
-
"Mission control for parallel feature branches": neutral dark surfaces, a single
|
|
6
|
-
restrained blue accent, and a strict semantic status palette. Sans-serif UI,
|
|
7
|
-
monospace only for code/paths/data. */
|
|
8
|
-
@theme {
|
|
9
|
-
/* Surfaces */
|
|
10
|
-
--color-base: #0b0c0e;
|
|
11
|
-
--color-surface: #141619;
|
|
12
|
-
--color-raised: #1b1e22;
|
|
13
|
-
--color-hairline: #24272c;
|
|
14
|
-
--color-hairline-strong: #333840;
|
|
15
|
-
|
|
16
|
-
/* Foreground / text */
|
|
17
|
-
--color-content: #e7e9ec;
|
|
18
|
-
--color-content-muted: #9aa0a8;
|
|
19
|
-
--color-content-faint: #6a7078;
|
|
20
|
-
|
|
21
|
-
/* Interactive accent (nav active, primary actions, focus rings) */
|
|
22
|
-
--color-accent: #4f7cff;
|
|
23
|
-
--color-accent-hover: #6b8fff;
|
|
24
|
-
--color-accent-soft: #1b2540;
|
|
25
|
-
|
|
26
|
-
/* Semantic status language */
|
|
27
|
-
--color-success: #3fb950;
|
|
28
|
-
--color-warning: #d29922;
|
|
29
|
-
--color-danger: #f85149;
|
|
30
|
-
--color-running: #2db6c9;
|
|
31
|
-
--color-idle: #6a7078;
|
|
32
|
-
|
|
33
|
-
/* Typography */
|
|
34
|
-
--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
35
|
-
--font-display: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
|
|
36
|
-
--font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
|
|
37
|
-
|
|
38
|
-
/* Radii */
|
|
39
|
-
--radius-md: 0.5rem;
|
|
40
|
-
--radius-lg: 0.75rem;
|
|
41
|
-
|
|
42
|
-
/* ── Legacy palette remap ──────────────────────────────────────────────────
|
|
43
|
-
Maps the color names still used by not-yet-rewritten views (Create wizard,
|
|
44
|
-
Settings, Strategies) and the reused feature components onto the new tokens,
|
|
45
|
-
so every legacy element harmonizes with the modern theme without JSX edits.
|
|
46
|
-
Also defines the custom shades those views reference (which were previously
|
|
47
|
-
undefined and rendered with no color). */
|
|
48
|
-
--color-indigo-300: #8aa5ff;
|
|
49
|
-
--color-indigo-400: #6b8fff;
|
|
50
|
-
--color-indigo-500: #4f7cff;
|
|
51
|
-
--color-indigo-600: #3f68e0;
|
|
52
|
-
--color-indigo-650: #3f68e0;
|
|
53
|
-
--color-indigo-700: #3459c9;
|
|
54
|
-
--color-indigo-950: #182038;
|
|
55
|
-
--color-violet-500: #6b8fff;
|
|
56
|
-
--color-violet-600: #4f7cff;
|
|
57
|
-
|
|
58
|
-
--color-gray-300: #e7e9ec;
|
|
59
|
-
--color-gray-400: #9aa0a8;
|
|
60
|
-
--color-gray-500: #6a7078;
|
|
61
|
-
--color-gray-550: #6a7078;
|
|
62
|
-
--color-gray-555: #6a7078;
|
|
63
|
-
--color-gray-600: #565c64;
|
|
64
|
-
--color-gray-700: #333840;
|
|
65
|
-
--color-gray-800: #24272c;
|
|
66
|
-
--color-gray-850: #1b1e22;
|
|
67
|
-
--color-gray-900: #141619;
|
|
68
|
-
--color-gray-950: #0f1113;
|
|
69
|
-
|
|
70
|
-
--color-slate-300: #cfd3d8;
|
|
71
|
-
--color-slate-350: #b6bcc4;
|
|
72
|
-
--color-slate-400: #9aa0a8;
|
|
73
|
-
--color-slate-455: #8b929b;
|
|
74
|
-
--color-slate-500: #6a7078;
|
|
75
|
-
--color-slate-550: #6a7078;
|
|
76
|
-
--color-slate-700: #333840;
|
|
77
|
-
--color-slate-800: #24272c;
|
|
78
|
-
--color-slate-850: #1b1e22;
|
|
79
|
-
--color-slate-900: #141619;
|
|
80
|
-
--color-slate-905: #121417;
|
|
81
|
-
--color-slate-950: #0f1113;
|
|
82
|
-
|
|
83
|
-
--color-cyan-400: #2db6c9;
|
|
84
|
-
--color-cyan-455: #2db6c9;
|
|
85
|
-
--color-cyan-500: #2db6c9;
|
|
86
|
-
--color-cyan-650: #2596a6;
|
|
87
|
-
--color-emerald-650: #2f9e46;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* ─── Base ─────────────────────────────────────────────────────────────────── */
|
|
91
|
-
html {
|
|
92
|
-
color-scheme: dark;
|
|
93
|
-
}
|
|
94
|
-
body {
|
|
95
|
-
font-family: var(--font-sans);
|
|
96
|
-
background-color: var(--color-base);
|
|
97
|
-
color: var(--color-content);
|
|
98
|
-
-webkit-font-smoothing: antialiased;
|
|
99
|
-
text-rendering: optimizeLegibility;
|
|
100
|
-
}
|
|
101
|
-
code, pre, kbd, samp {
|
|
102
|
-
font-family: var(--font-mono);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Consistent focus ring for keyboard users */
|
|
106
|
-
:focus-visible {
|
|
107
|
-
outline: 2px solid var(--color-accent);
|
|
108
|
-
outline-offset: 2px;
|
|
109
|
-
border-radius: 2px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/* Sleek neutral scrollbars */
|
|
113
|
-
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
114
|
-
::-webkit-scrollbar-track { background: transparent; }
|
|
115
|
-
::-webkit-scrollbar-thumb {
|
|
116
|
-
background: #2a2e34;
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
border: 2px solid var(--color-base);
|
|
119
|
-
}
|
|
120
|
-
::-webkit-scrollbar-thumb:hover { background: #3a3f47; }
|
|
121
|
-
|
|
122
|
-
/* ─── Motion (respecting reduced-motion) ─────────────────────────────────────── */
|
|
123
|
-
@utility animate-fade-in {
|
|
124
|
-
animation: fade-in 0.16s ease-out both;
|
|
125
|
-
}
|
|
126
|
-
@utility animate-rise {
|
|
127
|
-
animation: rise 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
128
|
-
}
|
|
129
|
-
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
130
|
-
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
|
|
131
|
-
|
|
132
|
-
@media (prefers-reduced-motion: reduce) {
|
|
133
|
-
*, *::before, *::after {
|
|
134
|
-
animation-duration: 0.001ms !important;
|
|
135
|
-
animation-iteration-count: 1 !important;
|
|
136
|
-
transition-duration: 0.001ms !important;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* ─── Compatibility utilities (used by not-yet-restyled feature components) ─────
|
|
141
|
-
Remapped to the new neutral tokens so reused components inherit the modern look.
|
|
142
|
-
CRT/neon/text-glow effects were intentionally dropped. */
|
|
143
|
-
@utility glass-card {
|
|
144
|
-
background: var(--color-surface);
|
|
145
|
-
border: 1px solid var(--color-hairline);
|
|
146
|
-
}
|
|
147
|
-
@utility animate-slide-in {
|
|
148
|
-
animation: rise 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
149
|
-
}
|
|
150
|
-
@utility animate-spin-slow {
|
|
151
|
-
animation: spin 8s linear infinite;
|
|
152
|
-
}
|
|
153
|
-
@utility animate-pulse-glow-green {
|
|
154
|
-
animation: soft-pulse 2s infinite ease-in-out;
|
|
155
|
-
}
|
|
156
|
-
@utility animate-pulse-glow-cyan {
|
|
157
|
-
animation: soft-pulse 2.5s infinite ease-in-out;
|
|
158
|
-
}
|
|
159
|
-
@keyframes soft-pulse {
|
|
160
|
-
0%, 100% { opacity: 0.85; }
|
|
161
|
-
50% { opacity: 1; }
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* Terminal log themes for the service logs console */
|
|
165
|
-
.term-matrix { color: #3fb950; background-color: #0b0c0e; }
|
|
166
|
-
.term-dracula { color: #f8f8f2; background-color: #1b1e22; }
|
|
167
|
-
.term-classic { color: var(--color-content); background-color: #0b0f14; }
|
package/gui/src/lib/status.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Tone } from '../components/ui/index.js';
|
|
2
|
-
import type { WorkspaceStatus } from '../types.js';
|
|
3
|
-
|
|
4
|
-
/** Maps a workspace sync status to a display label + status-language tone. */
|
|
5
|
-
export function syncMeta(status: WorkspaceStatus['syncStatus']): { label: string; tone: Tone } {
|
|
6
|
-
switch (status) {
|
|
7
|
-
case 'up-to-date':
|
|
8
|
-
return { label: 'In sync', tone: 'success' };
|
|
9
|
-
case 'rebased':
|
|
10
|
-
return { label: 'Rebased', tone: 'accent' };
|
|
11
|
-
case 'conflict':
|
|
12
|
-
case 'stash-conflict':
|
|
13
|
-
return { label: 'Sync conflict', tone: 'danger' };
|
|
14
|
-
case 'error':
|
|
15
|
-
return { label: 'Sync error', tone: 'danger' };
|
|
16
|
-
default:
|
|
17
|
-
return { label: 'Not synced', tone: 'idle' };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Short repo basename from a full path. */
|
|
22
|
-
export function repoName(repoPath: string): string {
|
|
23
|
-
return repoPath.split(/[\\/]/).pop() || repoPath;
|
|
24
|
-
}
|
package/gui/src/main.tsx
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { StrictMode } from 'react'
|
|
2
|
-
import { createRoot } from 'react-dom/client'
|
|
3
|
-
import './index.css'
|
|
4
|
-
import App from './App.tsx'
|
|
5
|
-
|
|
6
|
-
declare global {
|
|
7
|
-
interface Window {
|
|
8
|
-
Neutralino?: any;
|
|
9
|
-
NL_PATH?: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async function waitForBackend(url: string, maxRetries = 25, delay = 200): Promise<boolean> {
|
|
14
|
-
for (let i = 0; i < maxRetries; i++) {
|
|
15
|
-
try {
|
|
16
|
-
const res = await fetch(url);
|
|
17
|
-
if (res.ok) {
|
|
18
|
-
console.log(`Backend connection established on attempt ${i + 1}`);
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
} catch {
|
|
22
|
-
// Ignored, retry
|
|
23
|
-
}
|
|
24
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
25
|
-
}
|
|
26
|
-
console.warn(`Backend connection timed out after ${maxRetries} attempts`);
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function renderApp() {
|
|
31
|
-
createRoot(document.getElementById('root')!).render(
|
|
32
|
-
<StrictMode>
|
|
33
|
-
<App />
|
|
34
|
-
</StrictMode>,
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (typeof window !== 'undefined' && window.Neutralino) {
|
|
39
|
-
window.Neutralino.init();
|
|
40
|
-
window.Neutralino.events.on('windowClose', () => {
|
|
41
|
-
window.Neutralino.app.exit();
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
(async () => {
|
|
45
|
-
const backendUrl = 'http://localhost:3000/api/config';
|
|
46
|
-
try {
|
|
47
|
-
const res = await fetch(backendUrl);
|
|
48
|
-
if (res.ok) {
|
|
49
|
-
console.log('NexusFlow Hono backend is already running.');
|
|
50
|
-
renderApp();
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
} catch {
|
|
54
|
-
console.log('NexusFlow Hono backend not detected. Launching...');
|
|
55
|
-
try {
|
|
56
|
-
const isWin = navigator.platform.includes('Win') || navigator.userAgent.includes('Windows');
|
|
57
|
-
const nlPath = window.NL_PATH || '.';
|
|
58
|
-
|
|
59
|
-
// Construct paths for packaged mode
|
|
60
|
-
const nodeBinary = isWin ? `${nlPath}/node/node.exe` : `${nlPath}/node/bin/node`;
|
|
61
|
-
const serverScript = `${nlPath}/server/dist/index.js`;
|
|
62
|
-
|
|
63
|
-
// Check if we are running in packaged mode by testing if the embedded node exists
|
|
64
|
-
let isPackaged = false;
|
|
65
|
-
try {
|
|
66
|
-
await window.Neutralino.filesystem.getStats(nodeBinary);
|
|
67
|
-
isPackaged = true;
|
|
68
|
-
} catch {
|
|
69
|
-
// File doesn't exist or filesystem API failed, meaning dev mode
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
let cmd: string;
|
|
73
|
-
if (isPackaged) {
|
|
74
|
-
console.log('Running in packaged mode, using embedded node and server...');
|
|
75
|
-
cmd = `"${nodeBinary}" "${serverScript}" ui --server-only --port 3000`;
|
|
76
|
-
} else {
|
|
77
|
-
console.log('Running in development mode, using global node and relative path...');
|
|
78
|
-
cmd = 'node ../NexusFlow/dist/index.js ui --server-only --port 3000';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
console.log('Spawning backend command:', cmd);
|
|
82
|
-
await window.Neutralino.os.execCommand(cmd, { background: true });
|
|
83
|
-
console.log('Hono backend successfully spawned. Waiting for port 3000...');
|
|
84
|
-
await waitForBackend(backendUrl);
|
|
85
|
-
} catch (err) {
|
|
86
|
-
console.error('Failed to spawn Hono backend:', err);
|
|
87
|
-
} finally {
|
|
88
|
-
renderApp();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
})();
|
|
92
|
-
} else {
|
|
93
|
-
renderApp();
|
|
94
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { FolderGit2, GitBranch, Play, AlertTriangle, Plus, ArrowRight, RefreshCw } from 'lucide-react';
|
|
3
|
-
import type { Feature, WorkspaceStatus } from '../types.js';
|
|
4
|
-
import { Button, Card, EmptyState, PageHeader, Skeleton, StatusPill } from '../components/ui/index.js';
|
|
5
|
-
import { syncMeta } from '../lib/status.js';
|
|
6
|
-
|
|
7
|
-
interface DashboardPageProps {
|
|
8
|
-
workspaces: Feature[];
|
|
9
|
-
workspaceStatuses: Record<string, WorkspaceStatus>;
|
|
10
|
-
workspacesLoading: boolean;
|
|
11
|
-
statusesLoading: boolean;
|
|
12
|
-
onOpenWorkspace: (id: string) => void;
|
|
13
|
-
onNewWorkspace: () => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function StatTile({ icon, label, value, tone }: { icon: ReactNode; label: string; value: ReactNode; tone: string }) {
|
|
17
|
-
return (
|
|
18
|
-
<Card className="flex items-center gap-3.5 p-4">
|
|
19
|
-
<div className={`grid h-9 w-9 shrink-0 place-items-center rounded-md ${tone}`}>{icon}</div>
|
|
20
|
-
<div className="min-w-0">
|
|
21
|
-
<div className="font-display text-xl font-bold leading-none text-content">{value}</div>
|
|
22
|
-
<div className="mt-1 text-xs text-content-muted">{label}</div>
|
|
23
|
-
</div>
|
|
24
|
-
</Card>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function DashboardPage({
|
|
29
|
-
workspaces,
|
|
30
|
-
workspaceStatuses,
|
|
31
|
-
workspacesLoading,
|
|
32
|
-
statusesLoading,
|
|
33
|
-
onOpenWorkspace,
|
|
34
|
-
onNewWorkspace,
|
|
35
|
-
}: DashboardPageProps) {
|
|
36
|
-
const statuses = Object.values(workspaceStatuses);
|
|
37
|
-
const withChanges = statuses.filter((s) => s.changedFiles > 0).length;
|
|
38
|
-
const running = statuses.reduce((n, s) => n + s.runningServices, 0);
|
|
39
|
-
const needsValidation = statuses.filter((s) => s.pendingValidation).length;
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className="mx-auto max-w-6xl animate-fade-in">
|
|
43
|
-
<PageHeader
|
|
44
|
-
title="Overview"
|
|
45
|
-
subtitle="Your multi-repo environment at a glance."
|
|
46
|
-
actions={<Button variant="primary" icon={<Plus size={16} />} onClick={onNewWorkspace}>New workspace</Button>}
|
|
47
|
-
/>
|
|
48
|
-
|
|
49
|
-
<div className="mb-8 grid grid-cols-2 gap-3 lg:grid-cols-4">
|
|
50
|
-
<StatTile icon={<FolderGit2 size={18} className="text-accent" />} tone="bg-accent-soft" label="Workspaces" value={workspaces.length} />
|
|
51
|
-
<StatTile icon={<GitBranch size={18} className="text-warning" />} tone="bg-warning/10" label="With uncommitted changes" value={withChanges} />
|
|
52
|
-
<StatTile icon={<Play size={18} className="text-running" />} tone="bg-running/10" label="Running services" value={running} />
|
|
53
|
-
<StatTile icon={<AlertTriangle size={18} className="text-warning" />} tone="bg-warning/10" label="Need validation" value={needsValidation} />
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div className="mb-3 flex items-center justify-between">
|
|
57
|
-
<h2 className="font-display text-sm font-semibold uppercase tracking-wider text-content-muted">Workspaces</h2>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
{workspacesLoading ? (
|
|
61
|
-
<div className="flex flex-col gap-2">
|
|
62
|
-
<Skeleton className="h-20" />
|
|
63
|
-
<Skeleton className="h-20" />
|
|
64
|
-
<Skeleton className="h-20" />
|
|
65
|
-
</div>
|
|
66
|
-
) : workspaces.length === 0 ? (
|
|
67
|
-
<Card>
|
|
68
|
-
<EmptyState
|
|
69
|
-
icon={<FolderGit2 size={40} />}
|
|
70
|
-
title="No workspaces yet"
|
|
71
|
-
description="Create a feature workspace to group repositories and give your AI assistants shared context."
|
|
72
|
-
action={<Button variant="primary" icon={<Plus size={16} />} onClick={onNewWorkspace}>New workspace</Button>}
|
|
73
|
-
/>
|
|
74
|
-
</Card>
|
|
75
|
-
) : (
|
|
76
|
-
<div className="flex flex-col gap-2">
|
|
77
|
-
{workspaces.map((ws) => {
|
|
78
|
-
const st = workspaceStatuses[ws.branchName];
|
|
79
|
-
const sync = st ? syncMeta(st.syncStatus) : null;
|
|
80
|
-
return (
|
|
81
|
-
<Card
|
|
82
|
-
key={ws.id}
|
|
83
|
-
className="group flex cursor-pointer items-center gap-4 p-4 transition-colors hover:border-hairline-strong hover:bg-raised"
|
|
84
|
-
onClick={() => onOpenWorkspace(ws.branchName)}
|
|
85
|
-
>
|
|
86
|
-
<div className="min-w-0 flex-1">
|
|
87
|
-
<div className="flex items-center gap-2">
|
|
88
|
-
<span className="truncate font-mono text-sm font-semibold text-content">{ws.branchName}</span>
|
|
89
|
-
<span className="shrink-0 text-xs text-content-faint">{ws.repos.length} repos</span>
|
|
90
|
-
</div>
|
|
91
|
-
{ws.description && <p className="mt-0.5 truncate text-xs text-content-muted">{ws.description}</p>}
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
<div className="flex shrink-0 items-center gap-1.5">
|
|
95
|
-
{!st && statusesLoading ? (
|
|
96
|
-
<Skeleton className="h-5 w-40" />
|
|
97
|
-
) : st ? (
|
|
98
|
-
<>
|
|
99
|
-
{st.changedFiles > 0 ? (
|
|
100
|
-
<StatusPill tone="warning" dot>
|
|
101
|
-
{st.changedFiles} changed
|
|
102
|
-
</StatusPill>
|
|
103
|
-
) : (
|
|
104
|
-
<StatusPill tone="idle" dot>
|
|
105
|
-
Clean
|
|
106
|
-
</StatusPill>
|
|
107
|
-
)}
|
|
108
|
-
{st.runningServices > 0 && (
|
|
109
|
-
<StatusPill tone="running" dot>
|
|
110
|
-
{st.runningServices} running
|
|
111
|
-
</StatusPill>
|
|
112
|
-
)}
|
|
113
|
-
{sync && (
|
|
114
|
-
<StatusPill tone={sync.tone}>
|
|
115
|
-
<RefreshCw size={11} /> {sync.label}
|
|
116
|
-
</StatusPill>
|
|
117
|
-
)}
|
|
118
|
-
</>
|
|
119
|
-
) : null}
|
|
120
|
-
<ArrowRight size={16} className="text-content-faint transition-transform group-hover:translate-x-0.5 group-hover:text-content" />
|
|
121
|
-
</div>
|
|
122
|
-
</Card>
|
|
123
|
-
);
|
|
124
|
-
})}
|
|
125
|
-
</div>
|
|
126
|
-
)}
|
|
127
|
-
</div>
|
|
128
|
-
);
|
|
129
|
-
}
|