repoburg 1.3.185 → 1.3.186
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/agent-pane/backend/package-lock.json +2359 -0
- package/agent-pane/backend/package.json +29 -0
- package/agent-pane/backend/src/codex/codex-provider.ts +260 -0
- package/agent-pane/backend/src/codex/item-mapper.ts +59 -0
- package/agent-pane/backend/src/db/index.ts +67 -0
- package/agent-pane/backend/src/db/schema.ts +65 -0
- package/agent-pane/backend/src/index.ts +55 -0
- package/agent-pane/backend/src/routes/sessions.ts +97 -0
- package/agent-pane/backend/src/routes/turns.ts +60 -0
- package/agent-pane/backend/src/ws/index.ts +43 -0
- package/agent-pane/backend/tsconfig.json +23 -0
- package/agent-pane/frontend/index.html +18 -0
- package/agent-pane/frontend/package-lock.json +1948 -0
- package/agent-pane/frontend/package.json +28 -0
- package/agent-pane/frontend/src/App.tsx +44 -0
- package/agent-pane/frontend/src/AppInitializer.tsx +46 -0
- package/agent-pane/frontend/src/api/client.ts +29 -0
- package/agent-pane/frontend/src/api/sessions.ts +31 -0
- package/agent-pane/frontend/src/api/websocket.ts +139 -0
- package/agent-pane/frontend/src/components/CommandInputBar.tsx +42 -0
- package/agent-pane/frontend/src/components/CommandPalette.tsx +196 -0
- package/agent-pane/frontend/src/components/DiffViewer.tsx +27 -0
- package/agent-pane/frontend/src/components/IdeWorkspace.tsx +25 -0
- package/agent-pane/frontend/src/components/NewSessionDialog.tsx +84 -0
- package/agent-pane/frontend/src/components/RenderArea.tsx +157 -0
- package/agent-pane/frontend/src/components/RightPanel.tsx +40 -0
- package/agent-pane/frontend/src/components/RuntimeIcon.tsx +16 -0
- package/agent-pane/frontend/src/components/SessionTabs.tsx +41 -0
- package/agent-pane/frontend/src/components/StatusBar.tsx +60 -0
- package/agent-pane/frontend/src/components/StatusDot.tsx +13 -0
- package/agent-pane/frontend/src/components/Toast.tsx +34 -0
- package/agent-pane/frontend/src/components/TurnContent.tsx +202 -0
- package/agent-pane/frontend/src/components/WorkspaceSidebar.tsx +60 -0
- package/agent-pane/frontend/src/components/panels/ChangesPanel.tsx +77 -0
- package/agent-pane/frontend/src/components/panels/LogsPanel.tsx +25 -0
- package/agent-pane/frontend/src/components/panels/MetricsPanel.tsx +69 -0
- package/agent-pane/frontend/src/components/panels/TurnsPanel.tsx +84 -0
- package/agent-pane/frontend/src/main.tsx +10 -0
- package/agent-pane/frontend/src/store/store.ts +492 -0
- package/agent-pane/frontend/src/styles/app.css +288 -0
- package/agent-pane/frontend/src/styles/tokens.css +62 -0
- package/agent-pane/frontend/src/types/index.ts +115 -0
- package/agent-pane/frontend/tsconfig.json +22 -0
- package/agent-pane/frontend/vite.config.ts +16 -0
- package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;510;590;600&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
2
|
+
@import './tokens.css';
|
|
3
|
+
|
|
4
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
5
|
+
|
|
6
|
+
html, body { height: 100%; overflow: hidden; }
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
font-family: var(--font-sans);
|
|
10
|
+
font-size: 13px;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
background: var(--canvas);
|
|
13
|
+
color: var(--text-2);
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
font-feature-settings: "ss03", "cv11";
|
|
18
|
+
font-variant-numeric: tabular-nums;
|
|
19
|
+
letter-spacing: -0.01em;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
23
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
24
|
+
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
|
|
25
|
+
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
|
|
26
|
+
|
|
27
|
+
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-md); }
|
|
28
|
+
|
|
29
|
+
/* === IDE Root Layout === */
|
|
30
|
+
.ide-root { display: flex; flex-direction: column; height: 100vh; }
|
|
31
|
+
.ide-layout { display: grid; grid-template-columns: 240px 1fr 300px; flex: 1; overflow: hidden; }
|
|
32
|
+
|
|
33
|
+
/* === Sidebar === */
|
|
34
|
+
.ide-sidebar { background: var(--surface-0); border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
|
|
35
|
+
.sidebar-header { padding: 10px 12px 8px; display: flex; align-items: center; justify-content: space-between; }
|
|
36
|
+
.sidebar-header-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
|
|
37
|
+
.sidebar-add { width: 20px; height: 20px; border-radius: var(--r-sm); border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all var(--dur-normal) var(--ease); }
|
|
38
|
+
.sidebar-add:hover { background: rgba(0,0,0,0.06); color: var(--text); }
|
|
39
|
+
|
|
40
|
+
.tree-section { margin-bottom: 2px; }
|
|
41
|
+
.tree-section-header { padding: 5px 8px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 590; color: var(--text-2); cursor: pointer; user-select: none; border-radius: var(--r-sm); transition: background var(--dur-fast) var(--ease); }
|
|
42
|
+
.tree-section-header:hover { background: rgba(0,0,0,0.04); }
|
|
43
|
+
.tree-chevron { font-size: 9px; color: var(--text-muted); width: 10px; transition: transform var(--dur-normal) var(--ease); }
|
|
44
|
+
.tree-section.collapsed .tree-chevron { transform: rotate(-90deg); }
|
|
45
|
+
.tree-section.collapsed .tree-children { display: none; }
|
|
46
|
+
.tree-count { margin-left: auto; font-size: 10px; background: var(--surface-2); padding: 1px 6px; border-radius: var(--r-pill); color: var(--text-muted); font-variant-numeric: tabular-nums; }
|
|
47
|
+
.tree-children { padding-left: 4px; }
|
|
48
|
+
.tree-item { padding: 4px 8px 4px 26px; border-radius: var(--r-sm); font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--text-2); user-select: none; transition: all var(--dur-fast) var(--ease); position: relative; }
|
|
49
|
+
.tree-item:hover { background: rgba(0,0,0,0.04); color: var(--text); }
|
|
50
|
+
.tree-item.active { background: var(--accent-soft); color: var(--text); }
|
|
51
|
+
.tree-item.active::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--accent); border-radius: var(--r-pill); }
|
|
52
|
+
.tree-item .ri { width: 16px; height: 16px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
|
|
53
|
+
.tree-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
54
|
+
.sidebar-footer { margin-top: auto; padding: 8px 12px; border-top: 1px solid var(--border-muted); font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
|
|
55
|
+
.sidebar-footer:hover { color: var(--text-2); }
|
|
56
|
+
|
|
57
|
+
/* === Center === */
|
|
58
|
+
.ide-center { display: flex; flex-direction: column; background: var(--canvas); overflow: hidden; min-height: 0; }
|
|
59
|
+
.ide-tabs { display: flex; background: var(--surface-0); border-bottom: 1px solid var(--border); overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
|
|
60
|
+
.ide-tabs::-webkit-scrollbar { display: none; }
|
|
61
|
+
.ide-tab { padding: 8px 12px; font-size: 12px; color: var(--text-3); border-right: 1px solid var(--border-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; user-select: none; transition: all var(--dur-fast) var(--ease); position: relative; }
|
|
62
|
+
.ide-tab:hover { background: rgba(0,0,0,0.03); color: var(--text-2); }
|
|
63
|
+
.ide-tab.active { color: var(--text); background: var(--canvas); }
|
|
64
|
+
.ide-tab.active::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
|
|
65
|
+
.ide-tab .ri { width: 14px; height: 14px; font-size: 7px; border-radius: 3px; }
|
|
66
|
+
.ide-tab-close { margin-left: 4px; color: var(--text-muted); font-size: 14px; opacity: 0; transition: opacity var(--dur-fast) var(--ease); display: flex; align-items: center; }
|
|
67
|
+
.ide-tab:hover .ide-tab-close { opacity: 1; }
|
|
68
|
+
.ide-tab-close:hover { color: var(--red); }
|
|
69
|
+
.ide-tab-add { padding: 8px 10px; color: var(--text-muted); cursor: pointer; font-size: 14px; transition: color var(--dur-fast) var(--ease); display: flex; align-items: center; }
|
|
70
|
+
.ide-tab-add:hover { color: var(--text); }
|
|
71
|
+
|
|
72
|
+
.ide-render { flex: 1; overflow: hidden; display: flex; flex-direction: column; position: relative; min-height: 0; }
|
|
73
|
+
.render-scroll { flex: 1; padding: 20px 28px; overflow-y: auto; font-size: 14px; line-height: 1.7; color: var(--text); min-height: 0; }
|
|
74
|
+
|
|
75
|
+
/* === Markdown === */
|
|
76
|
+
.render-content { max-width: 720px; }
|
|
77
|
+
.render-content h1, .render-content h2, .render-content h3 { margin: 20px 0 8px; font-weight: 600; color: var(--text); line-height: 1.3; }
|
|
78
|
+
.render-content h1 { font-size: 20px; }
|
|
79
|
+
.render-content h2 { font-size: 17px; }
|
|
80
|
+
.render-content h3 { font-size: 15px; }
|
|
81
|
+
.render-content p { margin-bottom: 12px; color: var(--text-2); }
|
|
82
|
+
.render-content ul, .render-content ol { margin-bottom: 12px; padding-left: 24px; }
|
|
83
|
+
.render-content li { margin-bottom: 4px; color: var(--text-2); }
|
|
84
|
+
.render-content code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-1); padding: 2px 6px; border-radius: var(--r-sm); color: var(--accent); }
|
|
85
|
+
.render-content pre { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; overflow-x: auto; margin-bottom: 12px; }
|
|
86
|
+
.render-content pre code { background: none; padding: 0; color: var(--text); font-size: 12.5px; line-height: 1.6; }
|
|
87
|
+
.render-content a { color: var(--accent); text-decoration: none; }
|
|
88
|
+
.render-content a:hover { text-decoration: underline; }
|
|
89
|
+
.render-content blockquote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--text-3); margin-bottom: 12px; }
|
|
90
|
+
.render-content table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
|
|
91
|
+
.render-content th, .render-content td { border: 1px solid var(--border); padding: 6px 10px; font-size: 13px; }
|
|
92
|
+
.render-content th { background: var(--surface-1); font-weight: 510; }
|
|
93
|
+
|
|
94
|
+
/* === Turn cards === */
|
|
95
|
+
.turn-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
|
|
96
|
+
.turn-header-icon { width: 24px; height: 24px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 9px; font-weight: 700; color: #fff; }
|
|
97
|
+
.turn-header-title { font-size: 14px; font-weight: 600; color: var(--text); }
|
|
98
|
+
.turn-header-meta { font-size: 11px; color: var(--text-muted); }
|
|
99
|
+
.user-message { font-size: 14px; color: var(--text); background: var(--accent-soft); padding: 12px 16px; border-radius: var(--r-md); border: 1px solid rgba(217,119,6,0.15); }
|
|
100
|
+
|
|
101
|
+
/* === Command input === */
|
|
102
|
+
.cmd-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-0); border-top: 1px solid var(--border); flex-shrink: 0; }
|
|
103
|
+
.cmd-bar:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
|
|
104
|
+
.cmd-input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 13px; font-family: var(--font-sans); outline: none; }
|
|
105
|
+
.cmd-input::placeholder { color: var(--text-muted); }
|
|
106
|
+
.cmd-send { padding: 4px 10px; border-radius: var(--r-sm); font-size: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: all var(--dur-fast) var(--ease); display: flex; align-items: center; gap: 4px; }
|
|
107
|
+
.cmd-send:hover { background: var(--surface-3); color: var(--text); }
|
|
108
|
+
|
|
109
|
+
/* === Right Panel === */
|
|
110
|
+
.ide-right { background: var(--surface-0); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
|
|
111
|
+
.right-tabs { display: flex; padding: 0 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 2px; }
|
|
112
|
+
.right-tab { padding: 7px 10px; font-size: 11px; font-weight: 510; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; user-select: none; transition: all var(--dur-fast) var(--ease); margin-bottom: -1px; }
|
|
113
|
+
.right-tab:hover { color: var(--text-2); }
|
|
114
|
+
.right-tab.active { color: var(--text); border-bottom-color: var(--accent); }
|
|
115
|
+
.right-content { flex: 1; overflow-y: auto; padding: 14px; }
|
|
116
|
+
|
|
117
|
+
.right-section { margin-bottom: 20px; }
|
|
118
|
+
.right-section-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px; }
|
|
119
|
+
|
|
120
|
+
.metric-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--border-muted); }
|
|
121
|
+
.metric-row:last-child { border: none; }
|
|
122
|
+
.metric-label { color: var(--text-3); }
|
|
123
|
+
.metric-val { color: var(--text); font-weight: 510; font-variant-numeric: tabular-nums; }
|
|
124
|
+
|
|
125
|
+
/* === Turns panel === */
|
|
126
|
+
.turn-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 12px; color: var(--text-3); transition: all var(--dur-fast) var(--ease); position: relative; }
|
|
127
|
+
.turn-item:hover { background: rgba(0,0,0,0.04); color: var(--text-2); }
|
|
128
|
+
.turn-item.active { background: var(--accent-soft); color: var(--text); }
|
|
129
|
+
.turn-item.active::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: var(--accent); border-radius: var(--r-pill); }
|
|
130
|
+
.turn-item-icon { width: 18px; height: 18px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 8px; font-weight: 700; color: #fff; }
|
|
131
|
+
.turn-item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
132
|
+
.turn-item-meta { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
|
|
133
|
+
|
|
134
|
+
/* === File changes === */
|
|
135
|
+
.file-change { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; border-bottom: 1px solid var(--border-muted); }
|
|
136
|
+
.file-change:last-child { border: none; }
|
|
137
|
+
.file-change.clickable { cursor: pointer; transition: background var(--dur-fast) var(--ease); }
|
|
138
|
+
.file-change.clickable:hover { background: rgba(0,0,0,0.03); }
|
|
139
|
+
.fc-status { width: 14px; text-align: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }
|
|
140
|
+
.fc-add { color: var(--green); }
|
|
141
|
+
.fc-mod { color: var(--amber); }
|
|
142
|
+
.fc-del { color: var(--red); }
|
|
143
|
+
.fc-name { flex: 1; color: var(--text-2); font-family: var(--font-mono); font-size: 11px; }
|
|
144
|
+
.fc-delta { font-size: 10px; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
|
|
145
|
+
|
|
146
|
+
/* === Diff === */
|
|
147
|
+
.diff-file-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md) var(--r-md) 0 0; border-bottom: none; }
|
|
148
|
+
.diff-file-status { width: 16px; height: 16px; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0; }
|
|
149
|
+
.diff-file-name { font-family: var(--font-mono); font-size: 13px; font-weight: 510; color: var(--text); }
|
|
150
|
+
.diff-file-stats { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
151
|
+
.diff-file-badge { padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-3); font-size: 10px; }
|
|
152
|
+
.diff-body { border: 1px solid var(--border); border-radius: 0 0 var(--r-md) var(--r-md); overflow: hidden; margin-bottom: 20px; }
|
|
153
|
+
.diff-line { display: flex; align-items: flex-start; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; }
|
|
154
|
+
.diff-line-num { width: 42px; flex-shrink: 0; text-align: right; padding: 0 8px; color: var(--text-muted); background: var(--surface-0); user-select: none; border-right: 1px solid var(--border-muted); }
|
|
155
|
+
.diff-sign { width: 20px; flex-shrink: 0; text-align: center; user-select: none; font-weight: 700; }
|
|
156
|
+
.diff-line-content { flex: 1; padding: 0 8px; white-space: pre-wrap; word-break: break-all; min-width: 0; }
|
|
157
|
+
.diff-line-add { background: rgba(22, 163, 74, 0.06); }
|
|
158
|
+
.diff-line-add .diff-sign { color: var(--green); }
|
|
159
|
+
.diff-line-del { background: rgba(220, 38, 38, 0.06); }
|
|
160
|
+
.diff-line-del .diff-sign { color: var(--red); }
|
|
161
|
+
.diff-line-ctx .diff-sign { color: var(--text-muted); }
|
|
162
|
+
.diff-line-ctx .diff-line-content { color: var(--text-3); }
|
|
163
|
+
|
|
164
|
+
/* === Scope toggle === */
|
|
165
|
+
.changes-scope-toggle { display: flex; gap: 2px; margin-bottom: 12px; padding: 2px; background: var(--surface-1); border-radius: var(--r-md); }
|
|
166
|
+
.scope-btn { flex: 1; padding: 5px 10px; border: none; background: transparent; color: var(--text-3); font-size: 11px; font-weight: 510; cursor: pointer; border-radius: var(--r-sm); font-family: var(--font-sans); transition: all var(--dur-fast) var(--ease); }
|
|
167
|
+
.scope-btn:hover { color: var(--text-2); }
|
|
168
|
+
.scope-btn.active { background: var(--surface-0); color: var(--text); box-shadow: var(--inset-highlight); }
|
|
169
|
+
|
|
170
|
+
/* === Log entries === */
|
|
171
|
+
.log-entry { padding: 5px 0; font-size: 11px; line-height: 1.5; border-bottom: 1px solid var(--border-muted); font-family: var(--font-mono); }
|
|
172
|
+
.log-entry:last-child { border: none; }
|
|
173
|
+
.log-time { color: var(--text-muted); margin-right: 8px; }
|
|
174
|
+
.log-level { font-weight: 700; margin-right: 6px; }
|
|
175
|
+
.log-info { color: var(--accent); }
|
|
176
|
+
.log-warn { color: var(--amber); }
|
|
177
|
+
.log-error { color: var(--red); }
|
|
178
|
+
.log-debug { color: var(--text-muted); }
|
|
179
|
+
.log-msg { color: var(--text-2); }
|
|
180
|
+
|
|
181
|
+
/* === Status Bar === */
|
|
182
|
+
.ide-statusbar { display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 24px; background: var(--surface-0); border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
|
|
183
|
+
.sb-item { display: flex; align-items: center; gap: 3px; cursor: pointer; transition: color var(--dur-fast) var(--ease); }
|
|
184
|
+
.sb-item:hover { color: var(--text-2); }
|
|
185
|
+
.sb-spacer { flex: 1; }
|
|
186
|
+
.sb-divider { color: var(--border); }
|
|
187
|
+
|
|
188
|
+
/* === Badges === */
|
|
189
|
+
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 510; white-space: nowrap; }
|
|
190
|
+
.badge-running { background: var(--green-soft); color: var(--green); }
|
|
191
|
+
.badge-queued { background: var(--amber-soft); color: var(--amber); }
|
|
192
|
+
.badge-done { background: var(--accent-soft); color: var(--accent); }
|
|
193
|
+
.badge-failed { background: var(--red-soft); color: var(--red); }
|
|
194
|
+
.badge-paused { background: rgba(168, 163, 153, 0.12); color: var(--text-muted); }
|
|
195
|
+
|
|
196
|
+
/* === Runtime Icons === */
|
|
197
|
+
.runtime-icon { width: 20px; height: 20px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: 0; }
|
|
198
|
+
.ic-claude { background: var(--ic-claude); }
|
|
199
|
+
.ic-codex { background: var(--ic-codex); }
|
|
200
|
+
.ic-repoburg { background: var(--ic-repoburg); }
|
|
201
|
+
.ic-cursor { background: var(--ic-cursor); }
|
|
202
|
+
|
|
203
|
+
/* === Status dots === */
|
|
204
|
+
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
|
|
205
|
+
.status-dot.running { background: var(--green); }
|
|
206
|
+
.status-dot.queued { background: var(--amber); }
|
|
207
|
+
.status-dot.error { background: var(--red); }
|
|
208
|
+
.status-dot.done { background: var(--accent); }
|
|
209
|
+
.status-dot.paused { background: var(--text-muted); }
|
|
210
|
+
|
|
211
|
+
/* === Lucide === */
|
|
212
|
+
[data-lucide], svg.lucide { width: 16px; height: 16px; stroke-width: 1.5; flex-shrink: 0; }
|
|
213
|
+
.icon-xs { width: 12px !important; height: 12px !important; }
|
|
214
|
+
.icon-sm { width: 14px !important; height: 14px !important; }
|
|
215
|
+
.icon-lg { width: 20px !important; height: 20px !important; }
|
|
216
|
+
|
|
217
|
+
/* === Dialog === */
|
|
218
|
+
.dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; z-index: 100; }
|
|
219
|
+
.dialog { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); width: 400px; max-width: 90vw; box-shadow: 0 8px 32px rgba(0,0,0,0.16); }
|
|
220
|
+
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border-muted); }
|
|
221
|
+
.dialog-title { font-size: 14px; font-weight: 600; color: var(--text); }
|
|
222
|
+
.dialog-close { border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--r-sm); display: flex; align-items: center; transition: all var(--dur-fast) var(--ease); }
|
|
223
|
+
.dialog-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
|
|
224
|
+
.dialog-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
|
|
225
|
+
.dialog-label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 510; color: var(--text-muted); }
|
|
226
|
+
.dialog-input { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; font-family: var(--font-sans); color: var(--text); background: var(--canvas); outline: none; transition: border-color var(--dur-fast) var(--ease); }
|
|
227
|
+
.dialog-input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
|
|
228
|
+
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-muted); }
|
|
229
|
+
.dialog-btn-cancel { padding: 6px 14px; border-radius: var(--r-sm); border: 1px solid var(--border); background: transparent; color: var(--text-2); font-size: 12px; cursor: pointer; font-family: var(--font-sans); transition: all var(--dur-fast) var(--ease); }
|
|
230
|
+
.dialog-btn-cancel:hover { background: var(--surface-2); color: var(--text); }
|
|
231
|
+
.dialog-btn-create { padding: 6px 14px; border-radius: var(--r-sm); border: none; background: var(--accent); color: #fff; font-size: 12px; font-weight: 510; cursor: pointer; font-family: var(--font-sans); transition: all var(--dur-fast) var(--ease); }
|
|
232
|
+
.dialog-btn-create:hover { background: var(--accent-hover); }
|
|
233
|
+
|
|
234
|
+
/* === Turn group === */
|
|
235
|
+
.turn-group { margin-bottom: 24px; }
|
|
236
|
+
.cmd-block { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; overflow-x: auto; margin-bottom: 12px; }
|
|
237
|
+
.cmd-block code { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
|
|
238
|
+
.cmd-output { background: var(--surface-0); border: 1px solid var(--border-muted); border-radius: var(--r-md); padding: 10px 14px; overflow-x: auto; margin-bottom: 12px; max-height: 200px; overflow-y: auto; }
|
|
239
|
+
.cmd-output code { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
|
|
240
|
+
.file-change-list { display: flex; flex-direction: column; gap: 2px; }
|
|
241
|
+
.todo-list { list-style: none; padding-left: 0; }
|
|
242
|
+
.todo-done { color: var(--text-3); text-decoration: line-through; }
|
|
243
|
+
.todo-pending { color: var(--text-2); }
|
|
244
|
+
|
|
245
|
+
/* === Empty state === */
|
|
246
|
+
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
|
|
247
|
+
|
|
248
|
+
/* === Command Palette === */
|
|
249
|
+
.palette-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.25); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding-top: 120px; z-index: 200; }
|
|
250
|
+
.palette { background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--r-lg); width: 520px; max-width: 90vw; box-shadow: 0 12px 40px rgba(0,0,0,0.2); overflow: hidden; }
|
|
251
|
+
.palette-search { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-muted); }
|
|
252
|
+
.palette-search input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 15px; font-family: var(--font-sans); outline: none; }
|
|
253
|
+
.palette-search input::placeholder { color: var(--text-muted); }
|
|
254
|
+
.palette-esc { font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); }
|
|
255
|
+
.palette-list { max-height: 360px; overflow-y: auto; padding: 4px; }
|
|
256
|
+
.palette-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
|
|
257
|
+
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background var(--dur-fast) var(--ease); }
|
|
258
|
+
.palette-item.selected { background: var(--accent-soft); }
|
|
259
|
+
.palette-item-icon { color: var(--text-muted); flex-shrink: 0; display: flex; align-items: center; }
|
|
260
|
+
.palette-item.selected .palette-item-icon { color: var(--accent); }
|
|
261
|
+
.palette-item-label { font-size: 13px; color: var(--text); font-weight: 510; }
|
|
262
|
+
.palette-item-hint { font-size: 11px; color: var(--text-muted); margin-left: auto; }
|
|
263
|
+
.palette-item-enter { color: var(--text-muted); flex-shrink: 0; }
|
|
264
|
+
|
|
265
|
+
/* === Toast === */
|
|
266
|
+
.toast-container { position: fixed; bottom: 36px; right: 16px; display: flex; flex-direction: column-reverse; gap: 8px; z-index: 300; pointer-events: none; }
|
|
267
|
+
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md); font-size: 12px; font-weight: 500; min-width: 280px; max-width: 400px; pointer-events: auto; animation: toast-in 200ms ease-out; border: 1px solid var(--border); background: var(--surface-0); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
|
|
268
|
+
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
|
|
269
|
+
.toast-success { border-left: 3px solid var(--green); } .toast-success svg { color: var(--green); }
|
|
270
|
+
.toast-error { border-left: 3px solid var(--red); } .toast-error svg { color: var(--red); }
|
|
271
|
+
.toast-info { border-left: 3px solid var(--accent); } .toast-info svg { color: var(--accent); }
|
|
272
|
+
.toast-warn { border-left: 3px solid var(--amber); } .toast-warn svg { color: var(--amber); }
|
|
273
|
+
.toast-message { flex: 1; color: var(--text-2); }
|
|
274
|
+
.toast-close { border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 2px; border-radius: var(--r-sm); display: flex; align-items: center; transition: color var(--dur-fast) var(--ease); }
|
|
275
|
+
.toast-close:hover { color: var(--text); }
|
|
276
|
+
|
|
277
|
+
/* === Error / Aborted Banner === */
|
|
278
|
+
.error-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.2); border-radius: var(--r-md); margin-bottom: 16px; }
|
|
279
|
+
.banner-icon { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
|
|
280
|
+
.error-banner .banner-icon { background: var(--red); color: #fff; }
|
|
281
|
+
.error-banner .banner-text { color: var(--red); font-size: 13px; font-weight: 500; }
|
|
282
|
+
.aborted-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.2); border-radius: var(--r-md); margin-bottom: 16px; }
|
|
283
|
+
.aborted-banner .banner-icon { background: var(--amber); color: #fff; }
|
|
284
|
+
.aborted-banner .banner-text { color: var(--amber); font-size: 13px; font-weight: 500; }
|
|
285
|
+
|
|
286
|
+
@media (prefers-reduced-motion: reduce) {
|
|
287
|
+
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
|
|
288
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* === Surface Ladder === */
|
|
3
|
+
--canvas: #fdfdfc;
|
|
4
|
+
--surface-0: #f8f7f5;
|
|
5
|
+
--surface-1: #f0efed;
|
|
6
|
+
--surface-2: #e6e4e0;
|
|
7
|
+
--surface-3: #d6d3cd;
|
|
8
|
+
|
|
9
|
+
/* === Borders === */
|
|
10
|
+
--border: #e2e0db;
|
|
11
|
+
--border-muted: #edebe7;
|
|
12
|
+
--border-hover: #ccc8c0;
|
|
13
|
+
|
|
14
|
+
/* === Text === */
|
|
15
|
+
--text: #1c1b18;
|
|
16
|
+
--text-2: #54504a;
|
|
17
|
+
--text-3: #78736c;
|
|
18
|
+
--text-muted: #a8a399;
|
|
19
|
+
|
|
20
|
+
/* === Accent (Amber) === */
|
|
21
|
+
--accent: #d97706;
|
|
22
|
+
--accent-hover: #b45309;
|
|
23
|
+
--accent-soft: rgba(217, 119, 6, 0.08);
|
|
24
|
+
--accent-glow: rgba(217, 119, 6, 0.2);
|
|
25
|
+
|
|
26
|
+
/* === Status colors === */
|
|
27
|
+
--green: #16a34a;
|
|
28
|
+
--amber: #ca8a04;
|
|
29
|
+
--red: #dc2626;
|
|
30
|
+
--green-soft: rgba(22, 163, 74, 0.08);
|
|
31
|
+
--amber-soft: rgba(202, 138, 4, 0.08);
|
|
32
|
+
--red-soft: rgba(220, 38, 38, 0.08);
|
|
33
|
+
|
|
34
|
+
/* === Runtime icons === */
|
|
35
|
+
--ic-claude: #c2410c;
|
|
36
|
+
--ic-codex: #6366f1;
|
|
37
|
+
--ic-repoburg: #059669;
|
|
38
|
+
--ic-cursor: #db2777;
|
|
39
|
+
|
|
40
|
+
/* === Typography === */
|
|
41
|
+
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
42
|
+
--font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
|
|
43
|
+
|
|
44
|
+
/* === Radius === */
|
|
45
|
+
--r-sm: 4px;
|
|
46
|
+
--r-md: 6px;
|
|
47
|
+
--r-lg: 8px;
|
|
48
|
+
--r-xl: 12px;
|
|
49
|
+
--r-pill: 9999px;
|
|
50
|
+
|
|
51
|
+
/* === Motion === */
|
|
52
|
+
--ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
53
|
+
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
|
54
|
+
--dur-fast: 100ms;
|
|
55
|
+
--dur-normal: 150ms;
|
|
56
|
+
--dur-slow: 250ms;
|
|
57
|
+
|
|
58
|
+
/* === Shadows === */
|
|
59
|
+
--inset-highlight: inset 0 1px 0 rgba(0, 0, 0, 0.03);
|
|
60
|
+
--inset-strong: inset 0 1px 0 rgba(0, 0, 0, 0.05);
|
|
61
|
+
--focus-ring: 0 0 0 3px var(--accent-glow);
|
|
62
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Real types matching backend schema (agent-pane/backend/src/db/schema.ts)
|
|
2
|
+
|
|
3
|
+
export type SessionStatus = 'active' | 'running' | 'completed' | 'failed' | 'aborted';
|
|
4
|
+
export type TurnStatus = 'pending' | 'running' | 'completed' | 'failed' | 'aborted';
|
|
5
|
+
export type ItemType =
|
|
6
|
+
| 'agent_message'
|
|
7
|
+
| 'reasoning'
|
|
8
|
+
| 'command_execution'
|
|
9
|
+
| 'file_change'
|
|
10
|
+
| 'mcp_tool_call'
|
|
11
|
+
| 'web_search'
|
|
12
|
+
| 'todo_list'
|
|
13
|
+
| 'error';
|
|
14
|
+
export type ItemStatus = 'in_progress' | 'completed' | 'failed';
|
|
15
|
+
|
|
16
|
+
export interface Session {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string | null;
|
|
19
|
+
runtime_type: string;
|
|
20
|
+
model: string | null;
|
|
21
|
+
cwd: string | null;
|
|
22
|
+
external_thread_id: string | null;
|
|
23
|
+
status: SessionStatus;
|
|
24
|
+
is_running: number; // 0 | 1
|
|
25
|
+
created_at: string;
|
|
26
|
+
updated_at: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TokenUsage {
|
|
30
|
+
input_tokens: number;
|
|
31
|
+
cached_input_tokens: number;
|
|
32
|
+
cache_write_input_tokens: number;
|
|
33
|
+
output_tokens: number;
|
|
34
|
+
reasoning_output_tokens: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Item {
|
|
38
|
+
id: string;
|
|
39
|
+
turn_id: string;
|
|
40
|
+
external_item_id: string | null;
|
|
41
|
+
type: ItemType;
|
|
42
|
+
data: Record<string, unknown> | null;
|
|
43
|
+
status: ItemStatus;
|
|
44
|
+
created_at: string;
|
|
45
|
+
updated_at: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Turn {
|
|
49
|
+
id: string;
|
|
50
|
+
session_id: string;
|
|
51
|
+
user_prompt: string;
|
|
52
|
+
agent_response: string | null;
|
|
53
|
+
thoughts: string | null;
|
|
54
|
+
token_usage: TokenUsage | null;
|
|
55
|
+
external_turn_id: string | null;
|
|
56
|
+
status: TurnStatus;
|
|
57
|
+
error: string | null;
|
|
58
|
+
created_at: string;
|
|
59
|
+
updated_at: string;
|
|
60
|
+
items: Item[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface SessionDetail extends Session {
|
|
64
|
+
turns: Turn[];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// UI-only types (not from backend)
|
|
68
|
+
|
|
69
|
+
export interface LogEntry {
|
|
70
|
+
time: string;
|
|
71
|
+
level: 'INFO' | 'WARN' | 'ERROR' | 'DEBUG';
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface DiffLine {
|
|
76
|
+
type: 'add' | 'del' | 'ctx';
|
|
77
|
+
content: string;
|
|
78
|
+
oldLine?: number;
|
|
79
|
+
newLine?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface PaletteCommand {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
hint: string;
|
|
86
|
+
icon: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type RightTab = 'turns' | 'metrics' | 'changes' | 'logs';
|
|
90
|
+
export type ChangesScope = 'session' | 'turngroup';
|
|
91
|
+
|
|
92
|
+
// Helper: map SessionStatus to UI status dot class
|
|
93
|
+
export function statusToDot(status: SessionStatus, isRunning: boolean): string {
|
|
94
|
+
if (isRunning) return 'running';
|
|
95
|
+
switch (status) {
|
|
96
|
+
case 'active': return 'done';
|
|
97
|
+
case 'completed': return 'done';
|
|
98
|
+
case 'failed': return 'error';
|
|
99
|
+
case 'aborted': return 'paused';
|
|
100
|
+
default: return 'done';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Helper: map SessionStatus to UI status label
|
|
105
|
+
export function statusToLabel(status: SessionStatus, isRunning: boolean): string {
|
|
106
|
+
if (isRunning) return 'Running';
|
|
107
|
+
switch (status) {
|
|
108
|
+
case 'active': return 'Active';
|
|
109
|
+
case 'completed': return 'Completed';
|
|
110
|
+
case 'running': return 'Running';
|
|
111
|
+
case 'failed': return 'Failed';
|
|
112
|
+
case 'aborted': return 'Aborted';
|
|
113
|
+
default: return status;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"allowImportingTsExtensions": true
|
|
19
|
+
},
|
|
20
|
+
"include": ["src"],
|
|
21
|
+
"exclude": ["node_modules"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [react()],
|
|
6
|
+
server: {
|
|
7
|
+
port: 5174,
|
|
8
|
+
proxy: {
|
|
9
|
+
'/api': 'http://localhost:3001',
|
|
10
|
+
'/ws': {
|
|
11
|
+
target: 'ws://localhost:3001',
|
|
12
|
+
ws: true,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|