moi-computer 0.0.1 → 0.0.3
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/bin/moi.mjs +3 -1
- package/client/components/BottomPanel.tsx +2 -2
- package/client/components/ChatInput.tsx +2 -2
- package/client/components/ChatPanel.tsx +3 -3
- package/client/components/ChatPopup.tsx +1 -1
- package/client/components/CustomizePanel.tsx +8 -8
- package/client/components/HiddenPanel.tsx +1 -1
- package/client/components/HomePage.tsx +1 -1
- package/client/components/MarkdownContent.tsx +2 -2
- package/client/components/TurnView.tsx +41 -41
- package/client/components/WidgetErrorBoundary.tsx +2 -2
- package/client/components/WidgetFrame.tsx +1 -1
- package/client/components/WidgetShell.tsx +1 -1
- package/client/components/Widgets.tsx +2 -2
- package/client/components/WorkspacePreview.tsx +3 -3
- package/client/components/WorkspacesPage.tsx +17 -17
- package/client/components/layout/SidebarLayout.tsx +8 -8
- package/client/components/playground/PixelPainter.tsx +2 -2
- package/client/components/playground/PlaygroundPage.tsx +1 -1
- package/client/components/ui/button.tsx +4 -4
- package/client/components/ui/dropdown-menu.tsx +9 -9
- package/client/components/ui/popover.tsx +1 -1
- package/client/externalize-react.ts +5 -5
- package/client/index.css +1 -1
- package/client/index.html +13 -13
- package/dist/atlassian-b3tq39hs.png +0 -0
- package/dist/chunk-4615fa69.js +67 -0
- package/dist/chunk-582xmy05.css +1 -0
- package/dist/claude-z2xnay0d.svg +3 -0
- package/dist/discord-vejhptwx.png +0 -0
- package/dist/favicon-nbmyjfjh.png +0 -0
- package/dist/figma-y9898rry.png +0 -0
- package/dist/github-av5r5y3e.png +0 -0
- package/dist/gitlab-4pv5vm6b.png +0 -0
- package/dist/granola-7j3b0nk2.png +0 -0
- package/dist/hermes-nous-pznd63x9.png +0 -0
- package/dist/hubspot-hghcmc2t.png +0 -0
- package/dist/index.html +43 -0
- package/dist/linear-v9s3az2d.png +0 -0
- package/dist/neon-zj4qar44.png +0 -0
- package/dist/notion-w034c0b8.png +0 -0
- package/dist/openclaw-a2pyfhpn.svg +22 -0
- package/dist/sentry-hdwpmvek.png +0 -0
- package/dist/slack-1c1wj62s.png +0 -0
- package/dist/stripe-zrfaqbj3.png +0 -0
- package/dist/supabase-4vg33zf2.png +0 -0
- package/dist/vercel-7d0ssw28.png +0 -0
- package/package.json +14 -28
- package/server/cli.ts +7 -1
- package/server/web.ts +40 -5
package/bin/moi.mjs
CHANGED
|
@@ -18,7 +18,9 @@ if (!process.versions.bun) {
|
|
|
18
18
|
// installs from any package manager, unlike checking a hardcoded path.)
|
|
19
19
|
if (!Bun.which('moi')) {
|
|
20
20
|
console.error('Note: `moi` is not installed as a command — this run is temporary.')
|
|
21
|
-
console.error(
|
|
21
|
+
console.error(
|
|
22
|
+
'Install it so the command stays available (the agent calls it from your workspaces):'
|
|
23
|
+
)
|
|
22
24
|
console.error(' bun i -g moi-computer\n')
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -24,8 +24,8 @@ export function BottomPanel({ title, children, ref }: BottomPanelProps) {
|
|
|
24
24
|
exit="hidden"
|
|
25
25
|
transition={{ type: 'spring', duration: 0.25, bounce: 0 }}
|
|
26
26
|
>
|
|
27
|
-
<p className="
|
|
28
|
-
<div className="-my-1
|
|
27
|
+
<p className="mb-4 shrink-0 text-sm font-medium text-muted-foreground">{title}</p>
|
|
28
|
+
<div className="-my-1 [margin-right:calc(var(--page-pad)*-1)] [margin-left:calc(var(--page-pad)*-1)] flex-1 overflow-y-auto px-[var(--page-pad)] py-1">
|
|
29
29
|
{children}
|
|
30
30
|
</div>
|
|
31
31
|
</motion.div>
|
|
@@ -26,7 +26,7 @@ export function ChatInput({ value, onChange, onSend, onStop, processing }: ChatI
|
|
|
26
26
|
e.preventDefault()
|
|
27
27
|
ref.current?.focus()
|
|
28
28
|
}}
|
|
29
|
-
className="
|
|
29
|
+
className="flex w-full cursor-text flex-col gap-1 rounded-lg bg-white p-2 shadow-xs transition-[color,box-shadow] outline-none focus-within:shadow-sm"
|
|
30
30
|
>
|
|
31
31
|
<textarea
|
|
32
32
|
ref={ref}
|
|
@@ -44,7 +44,7 @@ export function ChatInput({ value, onChange, onSend, onStop, processing }: ChatI
|
|
|
44
44
|
disabled={processing}
|
|
45
45
|
autoFocus
|
|
46
46
|
rows={1}
|
|
47
|
-
className="field-sizing-content
|
|
47
|
+
className="field-sizing-content max-h-40 w-full resize-none bg-transparent px-2 py-1 text-sm leading-relaxed outline-none placeholder:text-muted-foreground disabled:opacity-50"
|
|
48
48
|
/>
|
|
49
49
|
<div className="flex justify-end">
|
|
50
50
|
{processing ? (
|
|
@@ -122,7 +122,7 @@ export function ChatPanel({
|
|
|
122
122
|
<DropdownMenuTrigger
|
|
123
123
|
render={
|
|
124
124
|
<Button
|
|
125
|
-
className="
|
|
125
|
+
className="gap-0 pr-1! pl-2!"
|
|
126
126
|
variant="ghost"
|
|
127
127
|
aria-label="Switch chat mode"
|
|
128
128
|
>
|
|
@@ -150,7 +150,7 @@ export function ChatPanel({
|
|
|
150
150
|
{chatMode === 'sidebar' && onCollapse && (
|
|
151
151
|
<Button variant="ghost" size="icon" onClick={onCollapse} aria-label="Collapse chat">
|
|
152
152
|
{/* Tabler icon with double chevrons has a really weird optical size, hence the adjustments */}
|
|
153
|
-
<IconChevronsRight className="text-muted-foreground
|
|
153
|
+
<IconChevronsRight className="size-6! text-muted-foreground" stroke={1.5} />
|
|
154
154
|
</Button>
|
|
155
155
|
)}
|
|
156
156
|
{chatMode === 'floating' && onClose && (
|
|
@@ -164,7 +164,7 @@ export function ChatPanel({
|
|
|
164
164
|
<div
|
|
165
165
|
ref={scrollRef}
|
|
166
166
|
className={cn(
|
|
167
|
-
'flex flex-1 flex-col gap-6 overflow-y-auto overscroll-contain px-2 pb-12
|
|
167
|
+
'flex flex-1 flex-col gap-6 overflow-y-auto overscroll-contain px-2 pt-4 pb-12',
|
|
168
168
|
showTopFade && showBottomFade && 'mask-fade-y',
|
|
169
169
|
showTopFade && !showBottomFade && 'mask-fade-top',
|
|
170
170
|
!showTopFade && showBottomFade && 'mask-fade-bottom'
|
|
@@ -24,7 +24,7 @@ export function ChatPopup({ defaultOpen = false, container, children }: ChatPopu
|
|
|
24
24
|
<Popover open={open} onOpenChange={o => setOpen(o)}>
|
|
25
25
|
<PopoverTrigger
|
|
26
26
|
render={
|
|
27
|
-
<div className="fixed
|
|
27
|
+
<div className="fixed right-4 bottom-4 sm:right-6 sm:bottom-6">
|
|
28
28
|
<motion.div
|
|
29
29
|
variants={{
|
|
30
30
|
from: { opacity: 0, scale: 0.8, filter: 'blur(4px)' },
|
|
@@ -52,7 +52,7 @@ export function CustomizePanel({ ref }: CustomizePanelProps) {
|
|
|
52
52
|
<div className="flex flex-col gap-6">
|
|
53
53
|
{/* Font picker */}
|
|
54
54
|
<div className="flex flex-col gap-2">
|
|
55
|
-
<p className="text-
|
|
55
|
+
<p className="text-xs font-medium text-muted-foreground">Font</p>
|
|
56
56
|
<div className="grid grid-cols-3 gap-2">
|
|
57
57
|
{FONT_OPTIONS.map(([key, config]) => (
|
|
58
58
|
<button
|
|
@@ -62,13 +62,13 @@ export function CustomizePanel({ ref }: CustomizePanelProps) {
|
|
|
62
62
|
className={cn(
|
|
63
63
|
'flex flex-col items-start rounded-md px-3 py-2 text-left transition-colors',
|
|
64
64
|
key === currentFont
|
|
65
|
-
? '
|
|
66
|
-
: 'hover:bg-muted
|
|
65
|
+
? 'bg-primary/5 ring-2 ring-primary'
|
|
66
|
+
: 'border-transparent hover:bg-muted'
|
|
67
67
|
)}
|
|
68
68
|
style={{ fontFamily: config.sans }}
|
|
69
69
|
>
|
|
70
70
|
<span className="text-sm font-medium">{config.label}</span>
|
|
71
|
-
<span className="text-muted-foreground
|
|
71
|
+
<span className="text-xs text-muted-foreground">{config.feel}</span>
|
|
72
72
|
</button>
|
|
73
73
|
))}
|
|
74
74
|
</div>
|
|
@@ -76,7 +76,7 @@ export function CustomizePanel({ ref }: CustomizePanelProps) {
|
|
|
76
76
|
|
|
77
77
|
{/* Color palette */}
|
|
78
78
|
<div className="flex flex-col gap-2">
|
|
79
|
-
<p className="text-
|
|
79
|
+
<p className="text-xs font-medium text-muted-foreground">Colors</p>
|
|
80
80
|
<div className="grid grid-cols-3 gap-2">
|
|
81
81
|
{COLOR_OPTIONS.map(([key, preset]) => {
|
|
82
82
|
const active = presetMatches(preset, currentBg, currentFg)
|
|
@@ -90,8 +90,8 @@ export function CustomizePanel({ ref }: CustomizePanelProps) {
|
|
|
90
90
|
className={cn(
|
|
91
91
|
'flex items-center gap-2 rounded-md border px-3 py-2 transition-colors',
|
|
92
92
|
active
|
|
93
|
-
? '
|
|
94
|
-
: 'hover:bg-muted
|
|
93
|
+
? 'bg-primary/5 ring-2 ring-primary'
|
|
94
|
+
: 'border-transparent hover:bg-muted'
|
|
95
95
|
)}
|
|
96
96
|
>
|
|
97
97
|
<span
|
|
@@ -99,7 +99,7 @@ export function CustomizePanel({ ref }: CustomizePanelProps) {
|
|
|
99
99
|
style={{ backgroundColor: preset.background ?? 'oklch(1 0 0)' }}
|
|
100
100
|
>
|
|
101
101
|
<span
|
|
102
|
-
className="flex size-full items-center justify-center text-[9px] font-bold
|
|
102
|
+
className="flex size-full items-center justify-center text-[9px] leading-none font-bold"
|
|
103
103
|
style={{ color: preset.foreground ?? 'oklch(0.145 0 0)' }}
|
|
104
104
|
>
|
|
105
105
|
A
|
|
@@ -53,7 +53,7 @@ export function HiddenPanel({ items, renderItem, onRestore, ref }: HiddenPanelPr
|
|
|
53
53
|
return (
|
|
54
54
|
<BottomPanel ref={ref} title="Hidden">
|
|
55
55
|
{/* gap-2 + grid-cols-4 + [grid-auto-rows:160px] matches RGL's margin/rowHeight exactly */}
|
|
56
|
-
<div className="grid grid-cols-4 gap-2
|
|
56
|
+
<div className="grid [grid-auto-rows:160px] grid-cols-4 gap-2">
|
|
57
57
|
<AnimatePresence>
|
|
58
58
|
{layout.map(item => (
|
|
59
59
|
<motion.div
|
|
@@ -7,7 +7,7 @@ export function HomePage() {
|
|
|
7
7
|
<SidebarLayout>
|
|
8
8
|
<PanelHeader>
|
|
9
9
|
<SidebarToggle />
|
|
10
|
-
<span className="text-
|
|
10
|
+
<span className="text-sm font-medium text-foreground">Home</span>
|
|
11
11
|
</PanelHeader>
|
|
12
12
|
<div className="min-h-0 flex-1 overflow-y-auto">
|
|
13
13
|
<WorkspacesPage />
|
|
@@ -12,8 +12,8 @@ const rehypePlugins = [rehypeHighlight]
|
|
|
12
12
|
const components = {
|
|
13
13
|
pre({ children }: ComponentProps<'pre'>) {
|
|
14
14
|
return (
|
|
15
|
-
<div className="not-prose
|
|
16
|
-
<pre className="
|
|
15
|
+
<div className="not-prose my-2 rounded-md border border-border bg-muted px-3 py-2.5">
|
|
16
|
+
<pre className="max-h-[300px] overflow-auto font-mono text-xs leading-relaxed whitespace-pre text-foreground/80">
|
|
17
17
|
{children}
|
|
18
18
|
</pre>
|
|
19
19
|
</div>
|
|
@@ -28,7 +28,7 @@ export function ThinkingIndicator() {
|
|
|
28
28
|
{[0, 1, 2].map(i => (
|
|
29
29
|
<span
|
|
30
30
|
key={i}
|
|
31
|
-
className="
|
|
31
|
+
className="block h-1.5 w-1.5 rounded-full bg-ring"
|
|
32
32
|
style={{
|
|
33
33
|
animation: 'pulse-dot 1.4s ease-in-out infinite',
|
|
34
34
|
animationDelay: `${i * 0.2}s`
|
|
@@ -58,7 +58,7 @@ export function TurnView({ turn }: TurnViewProps) {
|
|
|
58
58
|
.join('\n')
|
|
59
59
|
if (!text) return null
|
|
60
60
|
return (
|
|
61
|
-
<p className="ml-8 self-end
|
|
61
|
+
<p className="ml-8 self-end rounded-md bg-black/[0.07] px-4 py-2 text-sm leading-normal whitespace-pre-wrap">
|
|
62
62
|
{text}
|
|
63
63
|
</p>
|
|
64
64
|
)
|
|
@@ -114,7 +114,7 @@ function ReasoningPart({ text, redacted }: ReasoningPartProps) {
|
|
|
114
114
|
open={open}
|
|
115
115
|
onToggle={e => setOpen((e.target as HTMLDetailsElement).open)}
|
|
116
116
|
>
|
|
117
|
-
<summary className="
|
|
117
|
+
<summary className="flex cursor-pointer items-center gap-2 py-1 text-xs text-muted-foreground select-none">
|
|
118
118
|
<IconChevronRight
|
|
119
119
|
size={12}
|
|
120
120
|
stroke={1.5}
|
|
@@ -124,7 +124,7 @@ function ReasoningPart({ text, redacted }: ReasoningPartProps) {
|
|
|
124
124
|
<span>{redacted ? 'Redacted thinking' : 'Thinking'}</span>
|
|
125
125
|
</summary>
|
|
126
126
|
{!redacted && (
|
|
127
|
-
<div className="
|
|
127
|
+
<div className="mt-1 ml-4 text-xs leading-relaxed whitespace-pre-wrap text-muted-foreground italic">
|
|
128
128
|
{text}
|
|
129
129
|
</div>
|
|
130
130
|
)}
|
|
@@ -135,7 +135,7 @@ function ReasoningPart({ text, redacted }: ReasoningPartProps) {
|
|
|
135
135
|
type FilePartProps = { mediaType: string; url: string; filename?: string }
|
|
136
136
|
function FilePart({ mediaType, url, filename }: FilePartProps) {
|
|
137
137
|
return (
|
|
138
|
-
<div className="text-muted-foreground
|
|
138
|
+
<div className="text-xs text-muted-foreground">
|
|
139
139
|
📎 {filename ?? url} ({mediaType})
|
|
140
140
|
</div>
|
|
141
141
|
)
|
|
@@ -154,8 +154,8 @@ type DataPartProps = { name: string; data: unknown }
|
|
|
154
154
|
function DataPart({ name, data }: DataPartProps) {
|
|
155
155
|
return (
|
|
156
156
|
<details>
|
|
157
|
-
<summary className="
|
|
158
|
-
<pre className="
|
|
157
|
+
<summary className="cursor-pointer text-xs text-muted-foreground">data:{name}</summary>
|
|
158
|
+
<pre className="mt-1 overflow-auto rounded bg-muted p-2 text-xs text-muted-foreground">
|
|
159
159
|
{JSON.stringify(data, null, 2)}
|
|
160
160
|
</pre>
|
|
161
161
|
</details>
|
|
@@ -196,27 +196,27 @@ function GenericToolCard({ call }: GenericToolCardProps) {
|
|
|
196
196
|
|
|
197
197
|
return (
|
|
198
198
|
<details className="group">
|
|
199
|
-
<summary className="flex cursor-pointer
|
|
199
|
+
<summary className="flex cursor-pointer items-center gap-2 py-1.5 select-none">
|
|
200
200
|
<IconChevronRight
|
|
201
201
|
size={12}
|
|
202
202
|
stroke={1.5}
|
|
203
|
-
className="chevron text-ring
|
|
203
|
+
className="chevron shrink-0 text-ring transition-transform duration-150 group-open:rotate-90"
|
|
204
204
|
/>
|
|
205
205
|
<CallerBadge call={call} />
|
|
206
|
-
<span className="
|
|
207
|
-
<span className="
|
|
208
|
-
{isRunning && <IconLoader2 size={12} stroke={1.5} className="text-ring
|
|
206
|
+
<span className="text-xs font-medium whitespace-nowrap">{getToolDisplayName(call)}</span>
|
|
207
|
+
<span className="truncate text-[11px] text-ring">{formatInputBrief(call, cwd)}</span>
|
|
208
|
+
{isRunning && <IconLoader2 size={12} stroke={1.5} className="animate-spin text-ring" />}
|
|
209
209
|
</summary>
|
|
210
210
|
{(output || isError) && (
|
|
211
211
|
<div
|
|
212
212
|
className={cn(
|
|
213
|
-
'ml-4
|
|
213
|
+
'mt-1 ml-4 rounded-md border px-3 py-2.5',
|
|
214
214
|
isError ? 'border-red-200 bg-red-50' : 'border-border bg-muted'
|
|
215
215
|
)}
|
|
216
216
|
>
|
|
217
217
|
<pre
|
|
218
218
|
className={cn(
|
|
219
|
-
'max-h-[200px] overflow-y-auto
|
|
219
|
+
'max-h-[200px] overflow-y-auto font-mono text-xs leading-relaxed break-all whitespace-pre-wrap',
|
|
220
220
|
isError ? 'text-red-800' : 'text-muted-foreground'
|
|
221
221
|
)}
|
|
222
222
|
>
|
|
@@ -269,35 +269,35 @@ function MCPCallCard({ call, mcp }: MCPCallCardProps) {
|
|
|
269
269
|
|
|
270
270
|
return (
|
|
271
271
|
<details className="group">
|
|
272
|
-
<summary className="flex cursor-pointer
|
|
272
|
+
<summary className="flex cursor-pointer items-center gap-2 py-1.5 select-none">
|
|
273
273
|
<IconChevronRight
|
|
274
274
|
size={12}
|
|
275
275
|
stroke={1.5}
|
|
276
|
-
className="chevron text-ring
|
|
276
|
+
className="chevron shrink-0 text-ring transition-transform duration-150 group-open:rotate-90"
|
|
277
277
|
/>
|
|
278
|
-
<span className="
|
|
278
|
+
<span className="block size-4 shrink-0 overflow-hidden rounded-[3px] bg-muted">
|
|
279
279
|
{iconSrc ? (
|
|
280
280
|
<img src={iconSrc} alt="" className="size-full object-cover" />
|
|
281
281
|
) : (
|
|
282
|
-
<IconPlug size={12} stroke={1.5} className="text-muted-foreground
|
|
282
|
+
<IconPlug size={12} stroke={1.5} className="m-0.5 text-muted-foreground" />
|
|
283
283
|
)}
|
|
284
284
|
</span>
|
|
285
|
-
<span className="
|
|
285
|
+
<span className="text-xs font-medium whitespace-nowrap">
|
|
286
286
|
{formatMcpServerName(mcp.server)} MCP
|
|
287
287
|
</span>
|
|
288
|
-
<span className="
|
|
289
|
-
{isRunning && <IconLoader2 size={12} stroke={1.5} className="text-ring
|
|
288
|
+
<span className="truncate text-[11px] text-ring">{brief}</span>
|
|
289
|
+
{isRunning && <IconLoader2 size={12} stroke={1.5} className="animate-spin text-ring" />}
|
|
290
290
|
</summary>
|
|
291
291
|
{(output || isError) && (
|
|
292
292
|
<div
|
|
293
293
|
className={cn(
|
|
294
|
-
'ml-4
|
|
294
|
+
'mt-1 ml-4 rounded-md border px-3 py-2.5',
|
|
295
295
|
isError ? 'border-red-200 bg-red-50' : 'border-border bg-muted'
|
|
296
296
|
)}
|
|
297
297
|
>
|
|
298
298
|
<pre
|
|
299
299
|
className={cn(
|
|
300
|
-
'max-h-[200px] overflow-y-auto
|
|
300
|
+
'max-h-[200px] overflow-y-auto font-mono text-xs leading-relaxed break-all whitespace-pre-wrap',
|
|
301
301
|
isError ? 'text-red-800' : 'text-muted-foreground'
|
|
302
302
|
)}
|
|
303
303
|
>
|
|
@@ -324,20 +324,20 @@ function SkillCard({ call }: SkillCardProps) {
|
|
|
324
324
|
<span className="text-xs font-medium">
|
|
325
325
|
Loading skill <span className="font-mono">{skillName}</span>
|
|
326
326
|
</span>
|
|
327
|
-
{isRunning && <IconLoader2 size={12} stroke={1.5} className="text-ring
|
|
327
|
+
{isRunning && <IconLoader2 size={12} stroke={1.5} className="animate-spin text-ring" />}
|
|
328
328
|
{isError && <IconAlertTriangle size={12} stroke={1.5} className="text-red-600" />}
|
|
329
329
|
{body && (
|
|
330
330
|
<button
|
|
331
331
|
type="button"
|
|
332
332
|
onClick={() => setShowBody(v => !v)}
|
|
333
|
-
className="text-muted-foreground
|
|
333
|
+
className="text-[11px] text-muted-foreground underline"
|
|
334
334
|
>
|
|
335
335
|
{showBody ? 'hide' : 'show'} instructions
|
|
336
336
|
</button>
|
|
337
337
|
)}
|
|
338
338
|
</div>
|
|
339
339
|
{showBody && body && (
|
|
340
|
-
<pre className="
|
|
340
|
+
<pre className="max-h-[300px] overflow-y-auto rounded bg-muted p-3 font-mono text-xs leading-relaxed whitespace-pre-wrap text-muted-foreground">
|
|
341
341
|
{body}
|
|
342
342
|
</pre>
|
|
343
343
|
)}
|
|
@@ -356,7 +356,7 @@ function SubagentCard({ call, subagent }: SubagentCardProps) {
|
|
|
356
356
|
: null
|
|
357
357
|
|
|
358
358
|
const statusBadge = {
|
|
359
|
-
running: <IconLoader2 size={12} stroke={1.5} className="text-ring
|
|
359
|
+
running: <IconLoader2 size={12} stroke={1.5} className="animate-spin text-ring" />,
|
|
360
360
|
completed: <span className="text-xs text-emerald-700">✓</span>,
|
|
361
361
|
failed: <IconAlertTriangle size={12} stroke={1.5} className="text-red-600" />,
|
|
362
362
|
stopped: <IconX size={12} stroke={1.5} className="text-muted-foreground" />
|
|
@@ -367,7 +367,7 @@ function SubagentCard({ call, subagent }: SubagentCardProps) {
|
|
|
367
367
|
<button
|
|
368
368
|
type="button"
|
|
369
369
|
onClick={() => setOpen(true)}
|
|
370
|
-
className="
|
|
370
|
+
className="flex items-center gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-left transition-colors hover:bg-muted/70"
|
|
371
371
|
>
|
|
372
372
|
<IconUsersGroup size={14} stroke={1.5} className="shrink-0 text-blue-600" />
|
|
373
373
|
<div className="min-w-0 flex-1">
|
|
@@ -378,10 +378,10 @@ function SubagentCard({ call, subagent }: SubagentCardProps) {
|
|
|
378
378
|
{statusBadge}
|
|
379
379
|
</div>
|
|
380
380
|
{latest && (
|
|
381
|
-
<div className="
|
|
381
|
+
<div className="mt-0.5 truncate text-[11px] text-muted-foreground">{latest}</div>
|
|
382
382
|
)}
|
|
383
383
|
{status !== 'running' && subagent.usage?.toolUses != null && (
|
|
384
|
-
<div className="
|
|
384
|
+
<div className="mt-0.5 text-[11px] text-muted-foreground">
|
|
385
385
|
{subagent.usage.toolUses} tool call{subagent.usage.toolUses === 1 ? '' : 's'}
|
|
386
386
|
</div>
|
|
387
387
|
)}
|
|
@@ -405,16 +405,16 @@ function SubagentModal({ call, subagent, onClose }: SubagentModalProps) {
|
|
|
405
405
|
onClick={onClose}
|
|
406
406
|
>
|
|
407
407
|
<div
|
|
408
|
-
className="
|
|
408
|
+
className="flex max-h-[80vh] w-[min(800px,100%)] flex-col overflow-hidden rounded-lg bg-background shadow-xl"
|
|
409
409
|
onClick={e => e.stopPropagation()}
|
|
410
410
|
>
|
|
411
|
-
<header className="
|
|
411
|
+
<header className="flex items-start justify-between gap-3 border-b border-border px-5 py-4">
|
|
412
412
|
<div className="min-w-0 flex-1">
|
|
413
413
|
<div className="flex items-center gap-2">
|
|
414
414
|
<IconUsersGroup size={16} stroke={1.5} className="text-blue-600" />
|
|
415
415
|
<h3 className="text-sm font-semibold">{subagent.description || 'Subagent task'}</h3>
|
|
416
416
|
</div>
|
|
417
|
-
<div className="
|
|
417
|
+
<div className="mt-0.5 text-[11px] text-muted-foreground">
|
|
418
418
|
status: {subagent.status}
|
|
419
419
|
{subagent.usage?.durationMs != null &&
|
|
420
420
|
` · ${Math.round(subagent.usage.durationMs / 1000)}s`}
|
|
@@ -432,13 +432,13 @@ function SubagentModal({ call, subagent, onClose }: SubagentModalProps) {
|
|
|
432
432
|
</header>
|
|
433
433
|
|
|
434
434
|
<div className="flex flex-1 gap-4 overflow-hidden px-5 py-4">
|
|
435
|
-
<aside className="
|
|
436
|
-
<div className="
|
|
435
|
+
<aside className="w-52 shrink-0 border-r border-border pr-4">
|
|
436
|
+
<div className="mb-2 text-[11px] font-medium text-muted-foreground uppercase">
|
|
437
437
|
Progress
|
|
438
438
|
</div>
|
|
439
439
|
<ol className="flex flex-col gap-1">
|
|
440
440
|
{subagent.progress.map((p, i) => (
|
|
441
|
-
<li key={i} className="
|
|
441
|
+
<li key={i} className="truncate text-[11px] text-muted-foreground">
|
|
442
442
|
{i + 1}. {p}
|
|
443
443
|
</li>
|
|
444
444
|
))}
|
|
@@ -448,16 +448,16 @@ function SubagentModal({ call, subagent, onClose }: SubagentModalProps) {
|
|
|
448
448
|
<div className="flex flex-1 flex-col gap-4 overflow-y-auto pr-2">
|
|
449
449
|
{call.input != null && Object.keys(call.input as object).length > 0 && (
|
|
450
450
|
<details>
|
|
451
|
-
<summary className="
|
|
451
|
+
<summary className="cursor-pointer text-[11px] text-muted-foreground">
|
|
452
452
|
Prompt
|
|
453
453
|
</summary>
|
|
454
|
-
<pre className="bg-muted
|
|
454
|
+
<pre className="mt-1 rounded bg-muted p-2 font-mono text-xs whitespace-pre-wrap text-muted-foreground">
|
|
455
455
|
{JSON.stringify(call.input, null, 2)}
|
|
456
456
|
</pre>
|
|
457
457
|
</details>
|
|
458
458
|
)}
|
|
459
459
|
{subagent.transcript.length === 0 ? (
|
|
460
|
-
<div className="text-muted-foreground
|
|
460
|
+
<div className="text-xs text-muted-foreground">No nested transcript captured.</div>
|
|
461
461
|
) : (
|
|
462
462
|
subagent.transcript.map(nested => <TurnView key={nested.id} turn={nested} />)
|
|
463
463
|
)}
|
|
@@ -472,14 +472,14 @@ type CallerBadgeProps = { call: ToolCall }
|
|
|
472
472
|
function CallerBadge({ call }: CallerBadgeProps) {
|
|
473
473
|
if (call.caller === 'mcp') {
|
|
474
474
|
return (
|
|
475
|
-
<span className="border
|
|
475
|
+
<span className="rounded border border-border px-1 text-[9px] text-muted-foreground uppercase">
|
|
476
476
|
mcp{call.mcpServer ? `:${call.mcpServer.slice(0, 8)}` : ''}
|
|
477
477
|
</span>
|
|
478
478
|
)
|
|
479
479
|
}
|
|
480
480
|
if (call.caller === 'server-tool') {
|
|
481
481
|
return (
|
|
482
|
-
<span className="border
|
|
482
|
+
<span className="rounded border border-border px-1 text-[9px] text-muted-foreground uppercase">
|
|
483
483
|
server
|
|
484
484
|
</span>
|
|
485
485
|
)
|
|
@@ -31,11 +31,11 @@ export class WidgetErrorBoundary extends Component<Props, State> {
|
|
|
31
31
|
if (this.state.error) {
|
|
32
32
|
return (
|
|
33
33
|
<div className="flex h-full w-full flex-col items-start justify-start gap-1.5 p-4 text-xs">
|
|
34
|
-
<div className="
|
|
34
|
+
<div className="flex items-center gap-1.5 font-semibold text-destructive">
|
|
35
35
|
<IconAlertTriangle size={14} stroke={1.5} />
|
|
36
36
|
Widget crashed
|
|
37
37
|
</div>
|
|
38
|
-
<div className="
|
|
38
|
+
<div className="font-mono break-words text-muted-foreground">
|
|
39
39
|
{this.state.error.message}
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
@@ -50,7 +50,7 @@ export function WidgetFrame({ editing, hidden, onRemove, children }: WidgetFrame
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
{editing && onRemove && (
|
|
53
|
-
<div className="absolute -
|
|
53
|
+
<div className="absolute -top-2 -right-2 opacity-0 transition-opacity group-hover/widget:opacity-100">
|
|
54
54
|
<Button
|
|
55
55
|
size="icon-sm"
|
|
56
56
|
variant="outline"
|
|
@@ -30,7 +30,7 @@ export function WidgetShell({ name }: WidgetShellProps) {
|
|
|
30
30
|
{widget.status === 'error' && (
|
|
31
31
|
<motion.p
|
|
32
32
|
key={`err-${widget.version}`}
|
|
33
|
-
className="
|
|
33
|
+
className="absolute inset-0 p-4 text-xs text-destructive"
|
|
34
34
|
initial={{ opacity: 0 }}
|
|
35
35
|
animate={{ opacity: 1 }}
|
|
36
36
|
exit={{ opacity: 0 }}
|
|
@@ -78,7 +78,7 @@ export function Widgets({ mode, widgets }: WidgetsProps) {
|
|
|
78
78
|
if (widgets.length === 0) {
|
|
79
79
|
return (
|
|
80
80
|
<div className="flex min-h-0 flex-1 items-center justify-center">
|
|
81
|
-
<p className="text-muted-foreground
|
|
81
|
+
<p className="text-sm text-muted-foreground">No widgets found</p>
|
|
82
82
|
</div>
|
|
83
83
|
)
|
|
84
84
|
}
|
|
@@ -90,7 +90,7 @@ export function Widgets({ mode, widgets }: WidgetsProps) {
|
|
|
90
90
|
// to its natural height.
|
|
91
91
|
<div className="relative min-h-0 flex-1">
|
|
92
92
|
<LayoutGroup>
|
|
93
|
-
<div className="h-full overflow-y-auto px-[var(--page-pad)]
|
|
93
|
+
<div className="h-full overflow-y-auto px-[var(--page-pad)] pt-[var(--page-pad)] pb-[calc(var(--page-pad)*2)]">
|
|
94
94
|
{/* Bottom reservation = 2× page-pad (the pb above) + the open panel's
|
|
95
95
|
height (this margin), so the last cards scroll clear of it. */}
|
|
96
96
|
<motion.div
|
|
@@ -16,12 +16,12 @@ export function WorkspacePreview({ workspaceId }: WorkspacePreviewProps) {
|
|
|
16
16
|
const isEmpty = query.data !== undefined && !hasItems
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<div className="
|
|
19
|
+
<div className="flex size-24 shrink-0 items-center justify-center rounded-lg bg-muted p-2">
|
|
20
20
|
{hasItems && (
|
|
21
21
|
<svg
|
|
22
22
|
viewBox={`0 0 ${cols} ${rows}`}
|
|
23
23
|
preserveAspectRatio="none"
|
|
24
|
-
className="
|
|
24
|
+
className="size-full animate-in duration-300 fade-in"
|
|
25
25
|
>
|
|
26
26
|
{items.map((item, i) => (
|
|
27
27
|
<rect
|
|
@@ -40,7 +40,7 @@ export function WorkspacePreview({ workspaceId }: WorkspacePreviewProps) {
|
|
|
40
40
|
<IconRobotFace
|
|
41
41
|
size={20}
|
|
42
42
|
stroke={1.5}
|
|
43
|
-
className="text-muted-foreground/40
|
|
43
|
+
className="animate-in text-muted-foreground/40 duration-300 fade-in"
|
|
44
44
|
/>
|
|
45
45
|
)}
|
|
46
46
|
</div>
|
|
@@ -53,7 +53,7 @@ export function WorkspacesPage() {
|
|
|
53
53
|
if (workspacesQuery.isPending || discoveredQuery.isPending) {
|
|
54
54
|
return (
|
|
55
55
|
<div className="flex min-h-[50vh] items-center justify-center">
|
|
56
|
-
<IconLoader2 size={20} stroke={1.5} className="text-muted-foreground
|
|
56
|
+
<IconLoader2 size={20} stroke={1.5} className="animate-spin text-muted-foreground" />
|
|
57
57
|
</div>
|
|
58
58
|
)
|
|
59
59
|
}
|
|
@@ -61,7 +61,7 @@ export function WorkspacesPage() {
|
|
|
61
61
|
if (workspacesQuery.isError || discoveredQuery.isError) {
|
|
62
62
|
return (
|
|
63
63
|
<div className="flex min-h-[50vh] items-center justify-center">
|
|
64
|
-
<p className="text-muted-foreground
|
|
64
|
+
<p className="text-sm text-muted-foreground">Could not load workspaces.</p>
|
|
65
65
|
</div>
|
|
66
66
|
)
|
|
67
67
|
}
|
|
@@ -73,7 +73,7 @@ export function WorkspacesPage() {
|
|
|
73
73
|
importMutation.isPending && importMutation.variables ? importMutation.variables.path : null
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
|
-
<div className="mx-auto w-full max-w-3xl px-8 pb-16
|
|
76
|
+
<div className="mx-auto w-full max-w-3xl px-8 pt-14 pb-16">
|
|
77
77
|
{count > 0 && (
|
|
78
78
|
<div className="mb-10 grid grid-cols-2 gap-3">
|
|
79
79
|
{workspaces.map(ws => (
|
|
@@ -87,9 +87,9 @@ export function WorkspacesPage() {
|
|
|
87
87
|
)}
|
|
88
88
|
|
|
89
89
|
{count === 0 && discovered.length === 0 && (
|
|
90
|
-
<p className="
|
|
90
|
+
<p className="mb-10 text-sm text-muted-foreground">
|
|
91
91
|
No workspaces yet. Run{' '}
|
|
92
|
-
<code className="bg-muted
|
|
92
|
+
<code className="rounded bg-muted px-1 py-0.5 font-mono text-xs">moi start</code> in a
|
|
93
93
|
project directory.
|
|
94
94
|
</p>
|
|
95
95
|
)}
|
|
@@ -97,10 +97,10 @@ export function WorkspacesPage() {
|
|
|
97
97
|
{discovered.length > 0 && (
|
|
98
98
|
<section>
|
|
99
99
|
<div className="mb-4">
|
|
100
|
-
<h2 className="
|
|
101
|
-
<p className="text-muted-foreground
|
|
100
|
+
<h2 className="mb-1.5 text-sm font-semibold text-foreground">Found on your machine</h2>
|
|
101
|
+
<p className="text-xs text-muted-foreground">Discovered via Claude Code and OpenClaw</p>
|
|
102
102
|
</div>
|
|
103
|
-
<ul className="border-
|
|
103
|
+
<ul className="border-t border-border">
|
|
104
104
|
{discovered.map(item => (
|
|
105
105
|
<SuggestedRow
|
|
106
106
|
key={item.path}
|
|
@@ -134,16 +134,16 @@ function WorkspaceCard({ workspace, onRemove }: WorkspaceCardProps) {
|
|
|
134
134
|
<a
|
|
135
135
|
href={`/workspace/${workspace.id}`}
|
|
136
136
|
className={cn(
|
|
137
|
-
'
|
|
137
|
+
'group flex gap-3.5 rounded-xl border border-border bg-card p-2 hover:bg-muted/40',
|
|
138
138
|
'transition-colors'
|
|
139
139
|
)}
|
|
140
140
|
>
|
|
141
141
|
<WorkspacePreview workspaceId={workspace.id} />
|
|
142
|
-
<div className="flex min-w-0 flex-1 flex-col gap-1.5 py-1 pl-1
|
|
142
|
+
<div className="flex min-w-0 flex-1 flex-col gap-1.5 py-1 pr-2 pl-1">
|
|
143
143
|
<div className="flex items-start justify-between gap-2">
|
|
144
144
|
<div className="flex min-w-0 items-center gap-2">
|
|
145
145
|
<TypeIcon type={workspace.type ?? 'claude-code'} />
|
|
146
|
-
<span className="
|
|
146
|
+
<span className="truncate text-sm font-semibold text-foreground">{name}</span>
|
|
147
147
|
</div>
|
|
148
148
|
<DropdownMenu>
|
|
149
149
|
<DropdownMenuTrigger
|
|
@@ -155,7 +155,7 @@ function WorkspaceCard({ workspace, onRemove }: WorkspaceCardProps) {
|
|
|
155
155
|
e.preventDefault()
|
|
156
156
|
e.stopPropagation()
|
|
157
157
|
}}
|
|
158
|
-
className="
|
|
158
|
+
className="-mt-0.5 -mr-1 text-muted-foreground"
|
|
159
159
|
aria-label="More actions"
|
|
160
160
|
>
|
|
161
161
|
<IconDots stroke={1.5} />
|
|
@@ -177,11 +177,11 @@ function WorkspaceCard({ workspace, onRemove }: WorkspaceCardProps) {
|
|
|
177
177
|
</DropdownMenuContent>
|
|
178
178
|
</DropdownMenu>
|
|
179
179
|
</div>
|
|
180
|
-
<div title={workspace.path} className="
|
|
180
|
+
<div title={workspace.path} className="truncate font-mono text-xs text-muted-foreground">
|
|
181
181
|
{workspace.displayPath ?? workspace.path}
|
|
182
182
|
</div>
|
|
183
183
|
<div className="flex-1" />
|
|
184
|
-
<div className="text-muted-foreground
|
|
184
|
+
<div className="text-xs text-muted-foreground">{meta}</div>
|
|
185
185
|
</div>
|
|
186
186
|
</a>
|
|
187
187
|
)
|
|
@@ -197,12 +197,12 @@ function SuggestedRow({ suggestion, onAdd, loading }: SuggestedRowProps) {
|
|
|
197
197
|
const { path, type } = suggestion
|
|
198
198
|
const name = displayName(suggestion)
|
|
199
199
|
return (
|
|
200
|
-
<li className="
|
|
200
|
+
<li className="flex items-center gap-3 border-b border-border px-1 py-2.5">
|
|
201
201
|
<TypeIcon type={type} className="opacity-70" />
|
|
202
|
-
<span className="
|
|
202
|
+
<span className="shrink-0 text-sm font-medium text-foreground/80">{name}</span>
|
|
203
203
|
<span
|
|
204
204
|
title={path}
|
|
205
|
-
className="
|
|
205
|
+
className="min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground"
|
|
206
206
|
>
|
|
207
207
|
{suggestion.displayPath ?? path}
|
|
208
208
|
</span>
|