@mrpatronz/nexusflow 0.1.0 → 0.1.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/.github/dependabot.yml +25 -0
- package/.github/workflows/release.yml +90 -0
- package/.vscode/launch.json +17 -0
- package/.vscode/tasks.json +17 -0
- package/README.md +1 -1
- package/dist/commands/commit.d.ts +18 -0
- package/dist/commands/commit.d.ts.map +1 -0
- package/dist/commands/commit.js +105 -0
- package/dist/commands/commit.js.map +1 -0
- package/dist/commands/diff.d.ts +11 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +101 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/sync.d.ts +11 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +96 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/generators/base.d.ts.map +1 -1
- package/dist/generators/base.js +3 -0
- package/dist/generators/base.js.map +1 -1
- package/dist/generators/index.d.ts +5 -2
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +88 -38
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/plan-generator.d.ts +40 -0
- package/dist/generators/plan-generator.d.ts.map +1 -0
- package/dist/generators/plan-generator.js +312 -0
- package/dist/generators/plan-generator.js.map +1 -0
- package/dist/gui/assets/index-B9Ph2bHH.css +2 -0
- package/dist/gui/assets/index-s4nRkpqY.js +21 -0
- package/dist/gui/index.html +2 -2
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +141 -1
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/multi-git.d.ts +108 -0
- package/dist/utils/multi-git.d.ts.map +1 -0
- package/dist/utils/multi-git.js +206 -0
- package/dist/utils/multi-git.js.map +1 -0
- package/extension/package-lock.json +2811 -0
- package/extension/package.json +61 -0
- package/extension/src/extension.ts +168 -0
- package/extension/tsconfig.json +19 -0
- package/gui/src/App.tsx +377 -24
- package/gui/src/features/changes/ChangesViewer.tsx +212 -0
- package/gui/src/features/knowledge/KnowledgeBase.tsx +84 -0
- package/gui/src/features/onboarding/OnboardingWizard.tsx +230 -0
- package/gui/src/features/plan/ImplementationPlan.tsx +32 -0
- package/gui/src/features/services/ServiceConsole.tsx +159 -0
- package/gui/src/features/sessions/SessionHistory.tsx +195 -0
- package/gui/src/features/workspace/WorkspaceBuilder.tsx +414 -0
- package/gui/src/features/workspace/WorkspaceList.tsx +382 -0
- package/gui/src/types.ts +61 -0
- package/package.json +6 -4
- package/src/commands/commit.ts +131 -0
- package/src/commands/diff.ts +125 -0
- package/src/commands/sync.ts +110 -0
- package/src/generators/base.ts +3 -0
- package/src/generators/index.ts +95 -40
- package/src/generators/plan-generator.ts +390 -0
- package/src/index.ts +59 -0
- package/src/server.ts +152 -1
- package/src/types.ts +17 -0
- package/src/utils/multi-git.ts +306 -0
- package/dist/gui/assets/index-Cq9V485S.js +0 -21
- package/dist/gui/assets/index-Dh1b5gSZ.css +0 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Play, Square, AlertTriangle } from 'lucide-react';
|
|
3
|
+
import type { Feature, ServiceConfig, RunningService, OrchestrationDetection } from '../../types.js';
|
|
4
|
+
|
|
5
|
+
interface ServiceConsoleProps {
|
|
6
|
+
ws: Feature;
|
|
7
|
+
services: ServiceConfig[];
|
|
8
|
+
runningServices: RunningService[];
|
|
9
|
+
selectedLogService: string | null;
|
|
10
|
+
serviceLogs: string;
|
|
11
|
+
logsEndRef: React.RefObject<HTMLDivElement | null>;
|
|
12
|
+
setSelectedLogService: (val: string | null) => void;
|
|
13
|
+
handleStartServices: (wsId: string) => Promise<void>;
|
|
14
|
+
handleStopServices: (wsId: string) => Promise<void>;
|
|
15
|
+
orchTools: OrchestrationDetection[];
|
|
16
|
+
servicesLoading: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const ServiceConsole: React.FC<ServiceConsoleProps> = ({
|
|
20
|
+
ws,
|
|
21
|
+
services,
|
|
22
|
+
runningServices,
|
|
23
|
+
selectedLogService,
|
|
24
|
+
serviceLogs,
|
|
25
|
+
logsEndRef,
|
|
26
|
+
setSelectedLogService,
|
|
27
|
+
handleStartServices,
|
|
28
|
+
handleStopServices,
|
|
29
|
+
orchTools,
|
|
30
|
+
servicesLoading,
|
|
31
|
+
}) => {
|
|
32
|
+
return (
|
|
33
|
+
<div>
|
|
34
|
+
{servicesLoading && (
|
|
35
|
+
<div className="flex items-center gap-2 text-[10px] text-gray-500 mb-3 animate-pulse">
|
|
36
|
+
<span className="w-1.5 h-1.5 rounded-full bg-indigo-500 animate-ping"></span>
|
|
37
|
+
<span>Scanning service configurations...</span>
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
{orchTools && orchTools.length > 0 && (
|
|
41
|
+
<div className="flex items-center gap-3 bg-indigo-500/5 border border-indigo-500/20 rounded-xl p-4 mb-4 text-xs text-indigo-300">
|
|
42
|
+
<AlertTriangle size={16} className="text-indigo-400 shrink-0" />
|
|
43
|
+
<div>
|
|
44
|
+
<strong>Orchestration manifest detected:</strong> {orchTools.map((t) => t.tool).join(', ')}. You can start them inside sub-repos.
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
{/* Telemetry Dashboard Grid */}
|
|
49
|
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
|
|
50
|
+
{/* Telemetry 1: CPU */}
|
|
51
|
+
<div className="bg-gray-950/40 border border-gray-800/60 rounded-xl p-4 flex flex-col justify-between">
|
|
52
|
+
<div className="flex justify-between items-center text-xs font-semibold text-gray-400 mb-2">
|
|
53
|
+
<span>Simulated CPU Load</span>
|
|
54
|
+
<span className={runningServices.length > 0 ? "text-emerald-400" : "text-gray-500"}>
|
|
55
|
+
{runningServices.length > 0 ? '4.8%' : '0%'}
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
<div className="w-full bg-gray-800 rounded-full h-1.5 mb-2 overflow-hidden">
|
|
59
|
+
<div
|
|
60
|
+
className={`h-1.5 rounded-full transition-all duration-500 ${runningServices.length > 0 ? "bg-gradient-to-r from-emerald-500 to-teal-400 animate-pulse" : "bg-gray-700"}`}
|
|
61
|
+
style={{ width: runningServices.length > 0 ? '48%' : '0%' }}
|
|
62
|
+
></div>
|
|
63
|
+
</div>
|
|
64
|
+
<span className="text-[10px] text-gray-500">Fluctuating active worker processes</span>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{/* Telemetry 2: Memory */}
|
|
68
|
+
<div className="bg-gray-950/40 border border-gray-800/60 rounded-xl p-4 flex flex-col justify-between">
|
|
69
|
+
<div className="flex justify-between items-center text-xs font-semibold text-gray-400 mb-2">
|
|
70
|
+
<span>Simulated Memory Allocation</span>
|
|
71
|
+
<span className={runningServices.length > 0 ? "text-cyan-400" : "text-gray-500"}>
|
|
72
|
+
{runningServices.length > 0 ? '192 MB' : '0 MB'}
|
|
73
|
+
</span>
|
|
74
|
+
</div>
|
|
75
|
+
<div className="w-full bg-gray-800 rounded-full h-1.5 mb-2 overflow-hidden">
|
|
76
|
+
<div
|
|
77
|
+
className={`h-1.5 rounded-full transition-all duration-500 ${runningServices.length > 0 ? "bg-gradient-to-r from-cyan-500 to-indigo-400" : "bg-gray-700"}`}
|
|
78
|
+
style={{ width: runningServices.length > 0 ? '65%' : '0%' }}
|
|
79
|
+
></div>
|
|
80
|
+
</div>
|
|
81
|
+
<span className="text-[10px] text-gray-500">Working set size for spawned servers</span>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
{/* Telemetry 3: Environment Health */}
|
|
85
|
+
<div className="bg-gray-950/40 border border-gray-800/60 rounded-xl p-4 flex flex-col justify-between">
|
|
86
|
+
<div className="flex justify-between items-center text-xs font-semibold text-gray-400 mb-2">
|
|
87
|
+
<span>Active Workspace Status</span>
|
|
88
|
+
<span className={`inline-flex items-center gap-1 text-[10px] uppercase font-bold tracking-wider ${runningServices.length > 0 ? "text-emerald-400" : "text-gray-500"}`}>
|
|
89
|
+
<span className={`w-1.5 h-1.5 rounded-full ${runningServices.length > 0 ? "bg-emerald-500 animate-ping" : "bg-gray-600"}`}></span>
|
|
90
|
+
{runningServices.length > 0 ? 'HEALTHY (ONLINE)' : 'STANDBY (OFFLINE)'}
|
|
91
|
+
</span>
|
|
92
|
+
</div>
|
|
93
|
+
<div className="text-xs text-white font-medium truncate">
|
|
94
|
+
{runningServices.length > 0 ? `${runningServices.length} processes active` : "All processes offline"}
|
|
95
|
+
</div>
|
|
96
|
+
<span className="text-[10px] text-gray-500">Service state mapping</span>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div className="flex gap-2 mb-6">
|
|
101
|
+
<button
|
|
102
|
+
className="inline-flex items-center justify-center gap-1.5 px-4 py-2.5 bg-emerald-500 hover:bg-emerald-600 text-white rounded-lg text-xs font-semibold transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed shadow-md shadow-emerald-500/10 hover:-translate-y-0.5 active:translate-y-0"
|
|
103
|
+
onClick={() => handleStartServices(ws.branchName)}
|
|
104
|
+
disabled={runningServices.length > 0}
|
|
105
|
+
>
|
|
106
|
+
<Play size={14} /> Start All Services
|
|
107
|
+
</button>
|
|
108
|
+
<button
|
|
109
|
+
className="inline-flex items-center justify-center gap-1.5 px-4 py-2.5 bg-rose-600 hover:bg-rose-700 text-white rounded-lg text-xs font-semibold transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed shadow-md shadow-rose-600/10 hover:-translate-y-0.5 active:translate-y-0"
|
|
110
|
+
onClick={() => handleStopServices(ws.branchName)}
|
|
111
|
+
disabled={runningServices.length === 0}
|
|
112
|
+
>
|
|
113
|
+
<Square size={14} /> Stop All
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
{/* Interactive Console Screen */}
|
|
118
|
+
{services.length > 0 && (
|
|
119
|
+
<div className="border border-gray-800/80 rounded-xl overflow-hidden shadow-2xl bg-gray-950/60">
|
|
120
|
+
{/* Terminal Window Header */}
|
|
121
|
+
<div className="flex items-center justify-between bg-gray-900/80 px-4 py-3 border-b border-gray-800/60">
|
|
122
|
+
<div className="flex items-center gap-2">
|
|
123
|
+
<div className="flex gap-1.5">
|
|
124
|
+
<span className="w-3 h-3 rounded-full bg-rose-500/20 border border-rose-500/30"></span>
|
|
125
|
+
<span className="w-3 h-3 rounded-full bg-amber-500/20 border border-amber-500/30"></span>
|
|
126
|
+
<span className="w-3 h-3 rounded-full bg-emerald-500/20 border border-emerald-500/30"></span>
|
|
127
|
+
</div>
|
|
128
|
+
<span className="text-[11px] font-mono text-gray-400 font-semibold ml-2">nexusflow-terminal: {selectedLogService}</span>
|
|
129
|
+
</div>
|
|
130
|
+
<div className="flex gap-1 bg-gray-950/40 p-1 rounded-lg border border-gray-800/60">
|
|
131
|
+
{services.map((svc) => (
|
|
132
|
+
<button
|
|
133
|
+
key={svc.name}
|
|
134
|
+
className={`px-3 py-1 rounded-md text-[10px] font-mono font-bold transition-all cursor-pointer ${
|
|
135
|
+
selectedLogService === svc.name
|
|
136
|
+
? 'bg-slate-800 text-white shadow-sm'
|
|
137
|
+
: 'text-gray-500 hover:text-gray-300'
|
|
138
|
+
}`}
|
|
139
|
+
onClick={() => setSelectedLogService(svc.name)}
|
|
140
|
+
>
|
|
141
|
+
{svc.name}
|
|
142
|
+
</button>
|
|
143
|
+
))}
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
{/* Terminal Screen Body */}
|
|
148
|
+
<div className="bg-[#030408] p-5 font-mono text-[11px] text-cyan-400/90 h-80 overflow-y-auto whitespace-pre-wrap shadow-inner relative scrollbar-thin scrollbar-thumb-gray-800">
|
|
149
|
+
<div className="absolute top-3 right-3 text-[9px] bg-slate-900/60 border border-gray-800 text-cyan-500/60 px-2 py-0.5 rounded font-mono select-none uppercase tracking-wider">
|
|
150
|
+
LIVE LOGS
|
|
151
|
+
</div>
|
|
152
|
+
{serviceLogs}
|
|
153
|
+
<div ref={logsEndRef}></div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
)}
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
159
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
};
|