moi-computer 0.3.0-next.1 → 0.3.0-next.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/README.md +1 -1
- package/bunfig.toml +5 -1
- package/client/AGENTS.md +17 -2
- package/client/accept-hmr-dependencies.ts +22 -0
- package/client/api/http.ts +31 -0
- package/client/api/query-options.ts +6 -0
- package/client/api/workspace-keys.ts +18 -0
- package/client/app/AppRouter.tsx +44 -0
- package/client/app/routes/HomeRoute.tsx +13 -0
- package/client/app/routes/WorkspaceRoute.tsx +95 -0
- package/client/app/shell/SidebarLayout.tsx +196 -0
- package/client/assets/openai.svg +3 -0
- package/client/assets.d.ts +9 -0
- package/client/components/{BottomPanel.tsx → shared/BottomPanel.tsx} +2 -2
- package/client/components/shared/PanelHeader.tsx +9 -0
- package/client/components/shared/ReorderableList.tsx +199 -0
- package/client/components/ui/button.tsx +11 -7
- package/client/components/ui/collapsible.tsx +15 -0
- package/client/components/ui/dialog.tsx +2 -2
- package/client/components/ui/dropdown-menu.tsx +5 -5
- package/client/components/ui/hover-card.tsx +1 -1
- package/client/components/ui/input.tsx +1 -1
- package/client/components/ui/popover.tsx +1 -1
- package/client/components/ui/skeleton.tsx +13 -0
- package/client/components/ui/tooltip.tsx +1 -1
- package/client/externalize-react.ts +7 -1
- package/client/features/applets/AppletMount.tsx +44 -0
- package/client/{components → features/applets}/WidgetErrorBoundary.tsx +1 -1
- package/client/{components → features/applets}/WidgetShell.tsx +5 -2
- package/client/{lib → features/applets}/applet-cache.ts +8 -0
- package/client/features/applets/applet-styles.ts +61 -0
- package/client/{hooks → features/applets}/useApplet.ts +6 -7
- package/client/{components/ChatInput.tsx → features/chat/ChatComposer.tsx} +30 -24
- package/client/features/chat/ChatPanel.tsx +171 -0
- package/client/{components → features/chat}/ChatPopup.tsx +24 -13
- package/client/{components/ThreadSelector.tsx → features/chat/ChatSelector.tsx} +15 -13
- package/client/{components → features/chat}/MarkdownContent.tsx +1 -1
- package/client/{components → features/chat}/ModelPicker.tsx +68 -17
- package/client/{components → features/chat}/TurnView.tsx +17 -11
- package/client/features/chat/api.ts +78 -0
- package/client/features/chat/chat-connection.ts +107 -0
- package/client/features/chat/chat-frames.ts +131 -0
- package/client/features/chat/chat-send.ts +57 -0
- package/client/{lib → features/chat}/preview-turn.ts +1 -1
- package/client/{components → features/chat}/tool-group/ReadImagePreview.tsx +1 -1
- package/client/{components → features/chat}/tool-group/SubagentCard.tsx +12 -10
- package/client/{components → features/chat}/tool-group/TimelineRow.tsx +5 -5
- package/client/{components → features/chat}/tool-group/ToolCallGroup.tsx +14 -5
- package/client/{components → features/chat}/tool-group/ToolOutput.tsx +12 -18
- package/client/{components → features/chat}/tool-group/format.ts +117 -0
- package/client/{hooks → features/chat}/useChat.ts +16 -44
- package/client/features/connectors/ConnectorsPage.tsx +92 -0
- package/client/features/connectors/McpMenu.tsx +145 -0
- package/client/features/connectors/api.ts +28 -0
- package/client/features/dev/DevRoutes.tsx +18 -0
- package/client/features/dev/HarnessDebugPage.tsx +468 -0
- package/client/{components/playground → features/dev}/PixelPainter.tsx +10 -21
- package/client/{components/playground → features/dev}/PlaygroundPage.tsx +10 -12
- package/client/{components/playground → features/dev}/ToolCallsPage.tsx +9 -11
- package/client/features/home/CreateWorkspaceDialog.tsx +130 -0
- package/client/features/home/CreateWorkspaceDialogSteps.tsx +234 -0
- package/client/features/home/HomeLogo.tsx +344 -0
- package/client/features/home/HomePage.tsx +214 -0
- package/client/{components → features/home}/WorkspacePreview.tsx +4 -4
- package/client/features/home/api.ts +156 -0
- package/client/features/home/workspace-presentation.tsx +44 -0
- package/client/features/scratchpad/Scratchpad.tsx +312 -0
- package/client/features/scratchpad/ScratchpadControls.tsx +503 -0
- package/client/features/scratchpad/useScratchpadSnapshot.tsx +115 -0
- package/client/features/settings/EnvironmentSettings.tsx +149 -0
- package/client/features/settings/GeneralSettings.tsx +90 -0
- package/client/{components → features}/settings/IconPicker.tsx +76 -224
- package/client/features/settings/SettingsLayout.tsx +53 -0
- package/client/{components → features}/settings/WorkspaceSettings.tsx +12 -16
- package/client/features/settings/api.ts +88 -0
- package/client/features/settings/icon-picker-options.ts +30 -0
- package/client/{hooks → features/settings}/useEnvVars.ts +4 -4
- package/client/features/views/ViewBuilderTab.tsx +153 -0
- package/client/features/views/api.ts +124 -0
- package/client/features/views/useViewBuilderActions.ts +72 -0
- package/client/{components → features/widgets}/HiddenPanel.tsx +3 -3
- package/client/{components → features/widgets}/WidgetFrame.tsx +3 -8
- package/client/{components → features/widgets}/WidgetGrid.tsx +38 -29
- package/client/features/widgets/Widgets.tsx +265 -0
- package/client/{lib/grid-pack.ts → features/widgets/grid.ts} +7 -1
- package/client/{hooks → features/widgets}/useGridReconcile.ts +1 -1
- package/client/{components → features/workspace}/CustomizePanel.tsx +5 -6
- package/client/{lib → features/workspace}/WorkspaceLayoutContext.tsx +16 -15
- package/client/features/workspace/WorkspaceScreen.tsx +675 -0
- package/client/features/workspace/WorkspaceTabs.tsx +205 -0
- package/client/features/workspace/api.ts +56 -0
- package/client/features/workspace/useFitsSplitLayout.ts +37 -0
- package/client/global.d.ts +5 -0
- package/client/index.css +6 -45
- package/client/index.html +2 -2
- package/client/index.tsx +14 -31
- package/client/lib/app-icon-registry.ts +145 -0
- package/client/main.tsx +2 -2
- package/client/runtime/hmr-watchdog.ts +39 -0
- package/client/{hooks/useMeiEvents.ts → runtime/useWorkspaceEvents.ts} +12 -7
- package/client/store/ui.ts +5 -1
- package/client/theme.css +1 -3
- package/dist/chunk-11cab5dq.css +1 -0
- package/dist/chunk-4vf1t6v1.js +10 -0
- package/dist/chunk-6c24yndg.js +61 -0
- package/dist/chunk-6c8cwpzc.js +1 -0
- package/dist/chunk-b4b276wx.js +15 -0
- package/dist/chunk-cs8vbert.js +546 -0
- package/dist/chunk-cwqmay73.css +1 -0
- package/dist/chunk-kxmvv1ax.js +48 -0
- package/dist/chunk-pcnahct1.js +5 -0
- package/dist/chunk-rq0ar7vp.js +1 -0
- package/dist/chunk-tqd3pkg8.css +1 -0
- package/dist/chunk-vkvb3hjm.js +2 -0
- package/dist/chunk-zpxrb1ce.js +2 -0
- package/dist/index.html +3 -3
- package/dist/openai-h13pza4b.svg +3 -0
- package/lib/format.ts +2 -2
- package/lib/types.ts +56 -9
- package/lib/view-builder-meta.ts +35 -0
- package/lib/workspace-layout.ts +14 -0
- package/lib/workspace-name.ts +14 -0
- package/package.json +4 -2
- package/server/AGENTS.md +3 -3
- package/server/api.ts +279 -60
- package/server/applets.ts +1 -1
- package/server/bundle-queue.ts +19 -0
- package/server/bundler/applet-css.ts +50 -0
- package/server/{build-applet.ts → bundler/build-applet.ts} +36 -26
- package/server/cli.ts +90 -7
- package/server/control.ts +106 -8
- package/server/env-apply.ts +2 -2
- package/server/harness/README.md +228 -0
- package/server/harness/claude-code/NOTES.md +578 -0
- package/{lib/claude-adapter.ts → server/harness/claude-code/adapter.ts} +67 -5
- package/server/harness/claude-code/index.ts +124 -0
- package/server/{mcp.ts → harness/claude-code/mcp.ts} +73 -16
- package/server/{cc-session.ts → harness/claude-code/session.ts} +42 -14
- package/server/harness/claude-code/sessions.ts +42 -0
- package/server/harness/codex/NOTES.md +239 -0
- package/server/harness/codex/adapter.ts +414 -0
- package/server/harness/codex/client.ts +343 -0
- package/server/harness/codex/index.ts +68 -0
- package/server/harness/codex/probe.ts +186 -0
- package/server/harness/codex/session.ts +617 -0
- package/server/harness/debug.ts +57 -0
- package/server/harness/openclaw/NOTES.md +316 -0
- package/server/{openclaw-adapter.ts → harness/openclaw/adapter.ts} +2 -2
- package/server/harness/openclaw/index.ts +93 -0
- package/server/{openclaw-session.ts → harness/openclaw/session.ts} +44 -9
- package/server/{openclaw-strip.ts → harness/openclaw/strip.ts} +3 -1
- package/server/harness/registry.ts +36 -0
- package/server/harness/types.ts +87 -0
- package/server/layout.ts +36 -11
- package/server/moi-scaffold.ts +56 -11
- package/server/registry.ts +30 -52
- package/server/state.ts +5 -38
- package/server/status.ts +7 -46
- package/server/vendor.ts +1 -1
- package/server/view-builders.ts +428 -0
- package/server/views.ts +0 -0
- package/server/web.ts +19 -40
- package/server/workspace-init.ts +11 -25
- package/tsconfig.json +1 -1
- package/workspace/.claude/skills/moi-workspace/DESIGN.md +2 -1
- package/workspace/.claude/skills/moi-workspace/SKILL.md +28 -7
- package/workspace/.claude/skills/moi-workspace/VIEW-DESIGN.md +1 -1
- package/client/api/workspaces.ts +0 -427
- package/client/assets/hermes-nous.png +0 -0
- package/client/components/App.tsx +0 -41
- package/client/components/ChatPanel.tsx +0 -275
- package/client/components/HomePage.tsx +0 -17
- package/client/components/McpMenu.tsx +0 -125
- package/client/components/Scratchpad.tsx +0 -935
- package/client/components/Widgets.tsx +0 -132
- package/client/components/WorkspacesPage.tsx +0 -245
- package/client/components/layout/SidebarLayout.tsx +0 -258
- package/client/components/routes/workspace/[id].tsx +0 -675
- package/client/components/routes/workspace/create.tsx +0 -155
- package/client/components/settings/SettingsPages.tsx +0 -255
- package/client/hooks/useFitsSidebar.ts +0 -34
- package/client/hooks/useScrollFade.ts +0 -38
- package/client/lib/connection.ts +0 -238
- package/dist/chunk-07qf2tv1.css +0 -1
- package/dist/chunk-w18801vn.js +0 -672
- package/dist/hermes-nous-pznd63x9.png +0 -0
- /package/client/components/{playground → shared}/LedLogo.tsx +0 -0
- /package/client/{components → features/chat}/ShimmerText.tsx +0 -0
- /package/client/{store/live.ts → features/chat/chat-store.ts} +0 -0
- /package/client/{lib → features/chat}/group-turns.ts +0 -0
- /package/client/{components → features/chat}/tool-group/CodeBlock.tsx +0 -0
- /package/client/{components → features/chat}/tool-group/Collapse.tsx +0 -0
- /package/client/{components → features/chat}/tool-group/detect.ts +0 -0
- /package/client/{components → features/chat}/tool-group/fixtures.ts +0 -0
- /package/client/{components → features/chat}/tool-group/index.ts +0 -0
- /package/client/{lib → features/chat}/uploads.ts +0 -0
- /package/client/{hooks → features/chat}/useStickToBottom.ts +0 -0
- /package/client/{components → features/connectors}/IconMcp.tsx +0 -0
- /package/client/{lib → features/connectors}/mcp-icons.ts +0 -0
- /package/client/{lib → features/scratchpad}/scratch-executor.ts +0 -0
- /package/client/{lib → features/settings}/render-icon.ts +0 -0
- /package/client/{lib → features/workspace}/WorkspaceContext.tsx +0 -0
- /package/client/{hooks → features/workspace}/useWorkspaceTheme.ts +0 -0
- /package/server/{agent.ts → harness/claude-code/models.ts} +0 -0
- /package/server/{openclaw.ts → harness/openclaw/discovery.ts} +0 -0
- /package/server/{openclaw-gateway.ts → harness/openclaw/gateway.ts} +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { IconLoader2, IconPlus, IconTrash } from '@tabler/icons-react'
|
|
4
|
+
|
|
5
|
+
import { Button } from '@/client/components/ui/button'
|
|
6
|
+
import { Input } from '@/client/components/ui/input'
|
|
7
|
+
import { Switch } from '@/client/components/ui/switch'
|
|
8
|
+
import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayoutContext'
|
|
9
|
+
import { cn } from '@/client/lib/cn'
|
|
10
|
+
import type { WorkspaceEnvVar } from '@/lib/types'
|
|
11
|
+
|
|
12
|
+
import { SettingsPage, SettingsRow, SettingsSection } from './SettingsLayout'
|
|
13
|
+
import { useEnvVars } from './useEnvVars'
|
|
14
|
+
|
|
15
|
+
const SOURCE_LABEL: Record<WorkspaceEnvVar['source'], string> = {
|
|
16
|
+
dotenv: '.env',
|
|
17
|
+
custom: 'secret',
|
|
18
|
+
both: 'override'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ENV_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/
|
|
22
|
+
|
|
23
|
+
export function EnvironmentSettings() {
|
|
24
|
+
const { workspaceId } = useWorkspaceLayoutCtx()
|
|
25
|
+
const { env, update } = useEnvVars(workspaceId)
|
|
26
|
+
const [draftKey, setDraftKey] = useState('')
|
|
27
|
+
const [draftValue, setDraftValue] = useState('')
|
|
28
|
+
|
|
29
|
+
const keyValid = ENV_KEY_RE.test(draftKey)
|
|
30
|
+
const canAdd = keyValid && draftValue.length > 0 && !update.isPending
|
|
31
|
+
|
|
32
|
+
const addVariable = () => {
|
|
33
|
+
if (!canAdd) return
|
|
34
|
+
update.mutate(
|
|
35
|
+
{ set: { [draftKey]: draftValue } },
|
|
36
|
+
{
|
|
37
|
+
onSuccess: () => {
|
|
38
|
+
setDraftKey('')
|
|
39
|
+
setDraftValue('')
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const variables = env.data?.vars ?? []
|
|
46
|
+
const fileCount = env.data?.files.reduce((count, file) => count + file.count, 0) ?? 0
|
|
47
|
+
const dotenvFiles = env.data?.files.length ?? 0
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<SettingsPage
|
|
51
|
+
title="Environment"
|
|
52
|
+
description="Secrets injected into widgets and the agent at run time. Values are write-only — they're never shown again once saved."
|
|
53
|
+
>
|
|
54
|
+
<SettingsSection label="Variables">
|
|
55
|
+
{env.isLoading ? (
|
|
56
|
+
<div className="flex items-center justify-center px-3.5 py-6 text-muted-foreground">
|
|
57
|
+
<IconLoader2 className="size-4 animate-spin" stroke={1.75} />
|
|
58
|
+
</div>
|
|
59
|
+
) : variables.length === 0 ? (
|
|
60
|
+
<p className="px-3.5 py-4 text-sm text-muted-foreground">No variables yet.</p>
|
|
61
|
+
) : (
|
|
62
|
+
variables.map(variable => {
|
|
63
|
+
const editable = variable.source !== 'dotenv'
|
|
64
|
+
return (
|
|
65
|
+
<div key={variable.key} className="flex items-center gap-3 px-3.5 py-2.5">
|
|
66
|
+
<code className="min-w-0 flex-1 truncate font-mono text-xs text-foreground">
|
|
67
|
+
{variable.key}
|
|
68
|
+
</code>
|
|
69
|
+
<span className="text-xs tracking-widest text-muted-foreground/60 select-none">
|
|
70
|
+
••••••
|
|
71
|
+
</span>
|
|
72
|
+
<span
|
|
73
|
+
className={cn(
|
|
74
|
+
'rounded-sm px-1.5 py-0.5 text-[11px] font-medium',
|
|
75
|
+
variable.source === 'dotenv'
|
|
76
|
+
? 'bg-muted text-muted-foreground'
|
|
77
|
+
: 'bg-primary/10 text-primary'
|
|
78
|
+
)}
|
|
79
|
+
>
|
|
80
|
+
{SOURCE_LABEL[variable.source]}
|
|
81
|
+
</span>
|
|
82
|
+
{!editable && (
|
|
83
|
+
<span className="text-right text-[11px] text-muted-foreground/60">from file</span>
|
|
84
|
+
)}
|
|
85
|
+
<Button
|
|
86
|
+
type="button"
|
|
87
|
+
variant="ghost"
|
|
88
|
+
size="icon-sm"
|
|
89
|
+
onClick={() => update.mutate({ remove: [variable.key] })}
|
|
90
|
+
disabled={!editable}
|
|
91
|
+
aria-label={`Delete ${variable.key}`}
|
|
92
|
+
className="disabled:invisible"
|
|
93
|
+
>
|
|
94
|
+
<IconTrash stroke={1.75} />
|
|
95
|
+
</Button>
|
|
96
|
+
</div>
|
|
97
|
+
)
|
|
98
|
+
})
|
|
99
|
+
)}
|
|
100
|
+
|
|
101
|
+
<div className="flex items-center gap-2 px-3.5 py-2.5">
|
|
102
|
+
<Input
|
|
103
|
+
value={draftKey}
|
|
104
|
+
onChange={event => setDraftKey(event.target.value)}
|
|
105
|
+
placeholder="NEW_KEY"
|
|
106
|
+
aria-invalid={draftKey.length > 0 && !keyValid}
|
|
107
|
+
className="h-7 w-40 font-mono text-xs"
|
|
108
|
+
/>
|
|
109
|
+
<Input
|
|
110
|
+
value={draftValue}
|
|
111
|
+
onChange={event => setDraftValue(event.target.value)}
|
|
112
|
+
onKeyDown={event => {
|
|
113
|
+
if (event.key === 'Enter') addVariable()
|
|
114
|
+
}}
|
|
115
|
+
type="password"
|
|
116
|
+
placeholder="value"
|
|
117
|
+
className="h-7 flex-1 text-xs"
|
|
118
|
+
/>
|
|
119
|
+
<Button variant="outline" size="sm" onClick={addVariable} disabled={!canAdd}>
|
|
120
|
+
{update.isPending ? (
|
|
121
|
+
<IconLoader2 stroke={1.75} className="animate-spin" />
|
|
122
|
+
) : (
|
|
123
|
+
<IconPlus stroke={1.75} />
|
|
124
|
+
)}
|
|
125
|
+
Add
|
|
126
|
+
</Button>
|
|
127
|
+
</div>
|
|
128
|
+
</SettingsSection>
|
|
129
|
+
|
|
130
|
+
<SettingsSection label="From .env files">
|
|
131
|
+
<SettingsRow
|
|
132
|
+
title="Inherit .env files"
|
|
133
|
+
description={
|
|
134
|
+
dotenvFiles > 0
|
|
135
|
+
? `Discovered ${fileCount} ${fileCount === 1 ? 'key' : 'keys'} across ${dotenvFiles} ${dotenvFiles === 1 ? 'file' : 'files'} in this space.`
|
|
136
|
+
: 'No .env files found in this space.'
|
|
137
|
+
}
|
|
138
|
+
control={
|
|
139
|
+
<Switch
|
|
140
|
+
checked={env.data?.inheritDotenv ?? true}
|
|
141
|
+
disabled={env.isLoading}
|
|
142
|
+
onCheckedChange={checked => update.mutate({ inheritDotenv: checked })}
|
|
143
|
+
/>
|
|
144
|
+
}
|
|
145
|
+
/>
|
|
146
|
+
</SettingsSection>
|
|
147
|
+
</SettingsPage>
|
|
148
|
+
)
|
|
149
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import { IconLoader2 } from '@tabler/icons-react'
|
|
4
|
+
import { useLocation } from 'wouter'
|
|
5
|
+
|
|
6
|
+
import { Button } from '@/client/components/ui/button'
|
|
7
|
+
import { Input } from '@/client/components/ui/input'
|
|
8
|
+
import { useWorkspaceLayoutCtx } from '@/client/features/workspace/WorkspaceLayoutContext'
|
|
9
|
+
import { useRemoveWorkspace } from '@/client/features/home/api'
|
|
10
|
+
|
|
11
|
+
import { useSaveWorkspaceName } from './api'
|
|
12
|
+
import { IconPicker } from './IconPicker'
|
|
13
|
+
import { SettingsPage, SettingsRow, SettingsSection } from './SettingsLayout'
|
|
14
|
+
|
|
15
|
+
export function GeneralSettings() {
|
|
16
|
+
const { name, icon, cwd, workspaceId } = useWorkspaceLayoutCtx()
|
|
17
|
+
const [, navigate] = useLocation()
|
|
18
|
+
const saveName = useSaveWorkspaceName(workspaceId)
|
|
19
|
+
const removeWorkspace = useRemoveWorkspace()
|
|
20
|
+
const [draft, setDraft] = useState(name ?? '')
|
|
21
|
+
|
|
22
|
+
const commit = () => {
|
|
23
|
+
const next = draft.trim()
|
|
24
|
+
if (next === (name ?? '')) return
|
|
25
|
+
saveName.mutate(next === '' ? null : next)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const remove = () => {
|
|
29
|
+
const label = name ?? cwd ?? 'this space'
|
|
30
|
+
const message = `Remove "${label}" from your workspaces?\n\nThis only removes it from your list. The folder and its sessions stay on disk. You can add it back any time.`
|
|
31
|
+
if (!window.confirm(message)) return
|
|
32
|
+
removeWorkspace.mutate(workspaceId, { onSuccess: () => navigate('/') })
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<SettingsPage title="General" description="Basic details for this space.">
|
|
37
|
+
<SettingsSection>
|
|
38
|
+
<SettingsRow
|
|
39
|
+
title="Name"
|
|
40
|
+
description="Shown in the sidebar and the workspace header."
|
|
41
|
+
control={
|
|
42
|
+
<Input
|
|
43
|
+
value={draft}
|
|
44
|
+
onChange={event => setDraft(event.target.value)}
|
|
45
|
+
onBlur={commit}
|
|
46
|
+
onKeyDown={event => {
|
|
47
|
+
if (event.key === 'Enter') event.currentTarget.blur()
|
|
48
|
+
}}
|
|
49
|
+
placeholder="Space name"
|
|
50
|
+
className="w-56"
|
|
51
|
+
/>
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
<div className="flex flex-col gap-4 px-3.5 py-3.5">
|
|
55
|
+
<div className="flex flex-col">
|
|
56
|
+
<span className="text-sm font-medium">Icon</span>
|
|
57
|
+
<span className="text-xs text-muted-foreground">
|
|
58
|
+
Pick an emoji or a glyph on a generated background, or upload an image.
|
|
59
|
+
</span>
|
|
60
|
+
</div>
|
|
61
|
+
<IconPicker icon={icon} />
|
|
62
|
+
</div>
|
|
63
|
+
</SettingsSection>
|
|
64
|
+
|
|
65
|
+
<SettingsSection label="Danger zone">
|
|
66
|
+
<SettingsRow
|
|
67
|
+
title="Remove space"
|
|
68
|
+
description="Remove this space from moi. Its folder and sessions stay on disk."
|
|
69
|
+
control={
|
|
70
|
+
<Button
|
|
71
|
+
type="button"
|
|
72
|
+
variant="destructive"
|
|
73
|
+
size="sm"
|
|
74
|
+
onClick={remove}
|
|
75
|
+
disabled={removeWorkspace.isPending}
|
|
76
|
+
>
|
|
77
|
+
{removeWorkspace.isPending && (
|
|
78
|
+
<IconLoader2 data-icon="inline-start" stroke={1.75} className="animate-spin" />
|
|
79
|
+
)}
|
|
80
|
+
Remove
|
|
81
|
+
</Button>
|
|
82
|
+
}
|
|
83
|
+
/>
|
|
84
|
+
{removeWorkspace.isError && (
|
|
85
|
+
<p className="px-3.5 py-3 text-xs text-destructive">{removeWorkspace.error.message}</p>
|
|
86
|
+
)}
|
|
87
|
+
</SettingsSection>
|
|
88
|
+
</SettingsPage>
|
|
89
|
+
)
|
|
90
|
+
}
|