moi-computer 0.12.0 → 0.12.1-next.0
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/client/AGENTS.md +2 -2
- package/client/api/app-ui-keys.ts +1 -1
- package/client/api/workspace-keys.ts +1 -3
- package/client/app/routes/WorkspaceRoute.tsx +2 -8
- package/client/features/applets/applet-runtime.ts +11 -13
- package/client/features/chat/ChatPanel.tsx +70 -49
- package/client/features/chat/ChatPopup.tsx +81 -8
- package/client/features/chat/applet-chat-intents.ts +31 -12
- package/client/features/chat/chat-send.ts +33 -1
- package/client/features/chat/chat-store.ts +10 -0
- package/client/features/chat/composer/ChatComposer.tsx +24 -27
- package/client/features/chat/composer/ModelPicker.tsx +3 -3
- package/client/features/chat/composer/useWorkspaceComposerState.tsx +3 -3
- package/client/features/chat/connection/chat-frames.ts +14 -7
- package/client/features/chat/messages/ChatEmptyState.tsx +33 -19
- package/client/features/chat/messages/MarkdownContent.tsx +3 -3
- package/client/features/chat/messages/fork-history.ts +14 -0
- package/client/features/chat/sessions/ChatSelector.tsx +138 -79
- package/client/features/chat/sessions/api.ts +109 -19
- package/client/features/chat/sessions/browser-tab-state.ts +30 -7
- package/client/features/chat/sessions/useSelectedSession.ts +217 -51
- package/client/features/chat/useChat.ts +43 -45
- package/client/features/collab/client.ts +10 -11
- package/client/features/collab/hooks.tsx +6 -11
- package/client/features/collab/host-state.ts +57 -128
- package/client/features/collab/provider.tsx +3 -3
- package/client/features/collab/testing/fake-engine.ts +6 -27
- package/client/features/collab/workspace-users-menu.tsx +3 -7
- package/client/features/drawings/{useViewBuilderSketch.ts → useViewSketch.ts} +7 -7
- package/client/features/home/HomePage.tsx +2 -2
- package/client/features/overview/Overview.tsx +3 -6
- package/client/features/overview/default/ViewsWidget.tsx +5 -12
- package/client/features/overview/default/registry.tsx +2 -4
- package/client/features/views/PendingViewScreen.tsx +279 -0
- package/client/features/views/ViewManager.tsx +10 -10
- package/client/features/views/api.ts +63 -130
- package/client/features/views/useViewActions.ts +151 -0
- package/client/features/views/useViewDrafts.ts +79 -0
- package/client/features/views/view-presentation.ts +4 -5
- package/client/features/views/view-submission.ts +88 -0
- package/client/features/workspace/WorkspaceMenu.tsx +63 -0
- package/client/features/workspace/WorkspaceScreen.tsx +180 -375
- package/client/features/workspace/browser-tab-state.ts +16 -9
- package/client/features/workspace/moi-context.ts +13 -15
- package/client/features/workspace/tab-resolution.ts +16 -29
- package/client/features/workspace/useWorkspaceNavigation.ts +146 -104
- package/client/index.tsx +5 -1
- package/client/runtime/useWorkspaceEvents.ts +7 -6
- package/client/store/ui.ts +25 -29
- package/dist/chunk-1zhnhy00.js +1 -0
- package/dist/chunk-27501vke.js +1 -0
- package/dist/{chunk-jf6czgrz.js → chunk-9xtv6djt.js} +2 -2
- package/dist/chunk-am1x230f.js +2 -0
- package/dist/{chunk-nez8sdta.js → chunk-darpsw65.js} +1 -1
- package/dist/{chunk-97eg9mjn.js → chunk-gps4qc38.js} +1 -1
- package/dist/{chunk-3a48fyf7.js → chunk-hzwr8dp8.js} +4 -4
- package/dist/{chunk-efdyz6xp.js → chunk-j905va8r.js} +1 -1
- package/dist/chunk-n33w9y38.js +10 -0
- package/dist/chunk-r63ks44z.js +68 -0
- package/dist/{chunk-vfpsc75k.js → chunk-vqpkqtdr.js} +1 -1
- package/dist/chunk-wd46nk26.css +1 -0
- package/dist/chunk-xgt7vxt9.js +1 -0
- package/dist/{chunk-z3byfve5.js → chunk-yvzhwtfa.js} +2 -2
- package/dist/index.html +1 -1
- package/lib/ids.ts +2 -5
- package/lib/moi-context.ts +100 -73
- package/lib/navigation.ts +48 -87
- package/lib/session-drafts.ts +10 -0
- package/lib/types.ts +64 -31
- package/lib/view-build-directives.ts +12 -0
- package/lib/workspace-layout.ts +1 -1
- package/lib/workspace-tabs.ts +12 -7
- package/package.json +3 -1
- package/server/agent-launcher.ts +27 -0
- package/server/api.ts +119 -209
- package/server/app-config.ts +21 -2
- package/server/applets/build-worker.ts +2 -1
- package/server/applets/view-source.ts +7 -1
- package/server/cli-env.ts +72 -50
- package/server/cli.ts +101 -64
- package/server/control.ts +82 -63
- package/server/data-dir.ts +13 -0
- package/server/functions.ts +2 -1
- package/server/harness/README.md +8 -0
- package/server/harness/acp/adapter.ts +2 -2
- package/server/harness/acp/client.ts +2 -1
- package/server/harness/acp/discovery.ts +3 -3
- package/server/harness/acp/session.ts +6 -9
- package/server/harness/claude-code/adapter.ts +13 -8
- package/server/harness/claude-code/auth.ts +3 -2
- package/server/harness/claude-code/cli.ts +3 -1
- package/server/harness/claude-code/git-worktree.ts +5 -2
- package/server/harness/claude-code/index.ts +5 -0
- package/server/harness/claude-code/mcp.ts +2 -0
- package/server/harness/claude-code/models.ts +2 -0
- package/server/harness/claude-code/session.ts +5 -34
- package/server/harness/claude-code/sessions.ts +8 -12
- package/server/harness/codex/NOTES.md +23 -4
- package/server/harness/codex/adapter.ts +5 -3
- package/server/harness/codex/client.ts +13 -21
- package/server/harness/codex/index.ts +18 -0
- package/server/harness/codex/session.ts +6 -14
- package/server/harness/codex/thread-list.ts +74 -0
- package/server/harness/fork.ts +12 -0
- package/server/harness/openclaw/adapter.ts +3 -3
- package/server/harness/openclaw/session.ts +2 -30
- package/server/harness/session-title.ts +12 -3
- package/server/harness/types.ts +8 -3
- package/server/moi-scaffold.ts +2 -1
- package/server/pending-views.ts +164 -0
- package/server/registry.ts +14 -4
- package/server/selected-session.ts +91 -44
- package/server/service.ts +16 -2
- package/server/session-archive.ts +32 -0
- package/server/session-config.ts +16 -111
- package/server/session-lifecycle.ts +17 -0
- package/server/session-store.ts +127 -0
- package/server/status.ts +3 -1
- package/server/tabs.ts +7 -10
- package/server/view-sessions.ts +267 -0
- package/server/views.ts +30 -41
- package/server/web.ts +47 -45
- package/server/workspace-env.ts +27 -0
- package/server/workspace-init.ts +6 -2
- package/workspace/.claude/skills/moi-workspace/SKILL.md +49 -20
- package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +2 -5
- package/client/features/views/ViewBuilder.tsx +0 -239
- package/client/features/views/useViewBuilderActions.ts +0 -103
- package/client/features/views/useViewBuilderDrafts.ts +0 -68
- package/dist/chunk-2jncyq65.js +0 -1
- package/dist/chunk-e2q5ken7.js +0 -68
- package/dist/chunk-h2kj1ysj.js +0 -1
- package/dist/chunk-nzwgm8vc.css +0 -1
- package/dist/chunk-ph0h6h86.js +0 -1
- package/dist/chunk-ryg9z3kn.js +0 -10
- package/dist/chunk-tpn177bt.js +0 -2
- package/lib/view-builder-directives.ts +0 -16
- package/server/chat-selection.ts +0 -22
- package/server/view-builders.ts +0 -453
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { toast } from '@/client/components/ui/toast'
|
|
4
|
-
import { useLatestRef } from '@/client/lib/use-latest-ref'
|
|
5
|
-
import { useUiStore } from '@/client/store/ui'
|
|
6
|
-
import type { ViewBuilder } from '@/lib/types'
|
|
7
|
-
|
|
8
|
-
type UseViewBuilderDraftsOptions = {
|
|
9
|
-
builders: ViewBuilder[]
|
|
10
|
-
onSave: (builderId: string, requirements: string) => Promise<unknown>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Builder draft text lives in the UI store and is subscribed from the
|
|
14
|
-
// composer, so a keystroke re-renders only the composer — never the workspace
|
|
15
|
-
// screen with its tab bar, Overview, mounted views, and builder canvases. This
|
|
16
|
-
// hook owns the writes: the store update, the debounced server save, and the
|
|
17
|
-
// cleanup when a builder leaves its draft state.
|
|
18
|
-
export function useViewBuilderDrafts({ builders, onSave }: UseViewBuilderDraftsOptions) {
|
|
19
|
-
const timersRef = useRef(new Map<string, ReturnType<typeof setTimeout>>())
|
|
20
|
-
const buildersRef = useLatestRef(builders)
|
|
21
|
-
const onSaveRef = useLatestRef(onSave)
|
|
22
|
-
|
|
23
|
-
const clear = useCallback((builderId: string) => {
|
|
24
|
-
const timer = timersRef.current.get(builderId)
|
|
25
|
-
if (timer) clearTimeout(timer)
|
|
26
|
-
timersRef.current.delete(builderId)
|
|
27
|
-
useUiStore.getState().setViewBuilderDraft(builderId, null)
|
|
28
|
-
}, [])
|
|
29
|
-
|
|
30
|
-
const change = useCallback(
|
|
31
|
-
(builderId: string, value: string) => {
|
|
32
|
-
useUiStore.getState().setViewBuilderDraft(builderId, value)
|
|
33
|
-
const existing = timersRef.current.get(builderId)
|
|
34
|
-
if (existing) clearTimeout(existing)
|
|
35
|
-
timersRef.current.set(
|
|
36
|
-
builderId,
|
|
37
|
-
setTimeout(() => {
|
|
38
|
-
timersRef.current.delete(builderId)
|
|
39
|
-
const builder = buildersRef.current.find(candidate => candidate.id === builderId)
|
|
40
|
-
if (!builder || builder.status !== 'draft') return
|
|
41
|
-
void onSaveRef.current(builderId, value).catch(() => {
|
|
42
|
-
toast.add({ title: 'Couldn’t save view description', type: 'error' })
|
|
43
|
-
})
|
|
44
|
-
}, 500)
|
|
45
|
-
)
|
|
46
|
-
},
|
|
47
|
-
[buildersRef, onSaveRef]
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
// Drop drafts for builders that left draft status through any path (submit
|
|
51
|
-
// from another surface, server-side transition). Builders absent from the
|
|
52
|
-
// list are cleared by the explicit discard/close paths, not here — the
|
|
53
|
-
// store outlives this screen and may hold other workspaces' drafts.
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
for (const builder of builders) {
|
|
56
|
-
if (builder.status !== 'draft') clear(builder.id)
|
|
57
|
-
}
|
|
58
|
-
}, [builders, clear])
|
|
59
|
-
|
|
60
|
-
useEffect(
|
|
61
|
-
() => () => {
|
|
62
|
-
for (const timer of timersRef.current.values()) clearTimeout(timer)
|
|
63
|
-
},
|
|
64
|
-
[]
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
return { change, clear }
|
|
68
|
-
}
|
package/dist/chunk-2jncyq65.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dc as a,Ec as b}from"/chunk-jf6czgrz.js";import"/chunk-vfpsc75k.js";import"/chunk-z3byfve5.js";import"/chunk-97eg9mjn.js";export{b as useAppConfig,a as loadAppConfig};
|