moi-computer 0.11.1-next.0 → 0.11.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/AGENTS.md +2 -2
- package/client/components/ui/button.tsx +1 -53
- package/client/components/ui/collapsible.tsx +1 -15
- package/client/components/ui/dialog.tsx +1 -58
- package/client/components/ui/dropdown-menu.tsx +1 -254
- package/client/components/ui/hover-card.tsx +1 -44
- package/client/components/ui/input.tsx +1 -21
- package/client/components/ui/popover.tsx +1 -88
- package/client/components/ui/resizable.tsx +1 -40
- package/client/components/ui/skeleton.tsx +1 -13
- package/client/components/ui/slider.tsx +1 -70
- package/client/components/ui/spinner.tsx +1 -18
- package/client/components/ui/switch.tsx +1 -23
- package/client/components/ui/tabs.tsx +1 -0
- package/client/components/ui/textarea.tsx +1 -18
- package/client/components/ui/tooltip.tsx +1 -51
- package/client/features/chat/ChatPanel.tsx +6 -6
- package/client/features/chat/ChatPopup.tsx +3 -4
- package/client/features/chat/TurnView.tsx +5 -4
- package/client/features/chat/api.ts +5 -14
- package/client/features/chat/chat-frames.ts +9 -7
- package/client/features/chat/chat-send.ts +13 -2
- package/client/features/chat/chat-store.ts +1 -3
- package/client/features/chat/composer/ChatComposer.tsx +5 -1
- package/client/features/chat/composer/ModelPicker.tsx +44 -44
- package/client/features/chat/composer/banners/ErrorBanner.tsx +20 -12
- package/client/features/chat/composer/model-order.ts +15 -0
- package/client/features/chat/composer/useWorkspaceComposerState.tsx +15 -7
- package/client/features/chat/group-turns.ts +12 -0
- package/client/features/chat/interleave-notices.ts +7 -11
- package/client/features/chat/session-view.ts +53 -0
- package/client/features/chat/tool-group/ToolCallGroup.tsx +1 -4
- package/client/features/chat/tool-group/format/codex.ts +4 -1
- package/client/features/chat/useChat.ts +10 -9
- package/client/features/dev/ChatStatesPage.tsx +3 -1
- package/client/features/dev/DevIndexPage.tsx +5 -0
- package/client/features/dev/DevRoutes.tsx +2 -0
- package/client/features/dev/HarnessDebugPage.tsx +1 -1
- package/client/features/dev/UiComponentPreviews.tsx +834 -0
- package/client/features/dev/UiComponentsPage.tsx +60 -0
- package/client/features/home/WorkspacePreview.tsx +1 -1
- package/client/features/home/workspace-setup/DemoDialog.tsx +3 -2
- package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +5 -8
- package/client/features/home/workspace-setup/WorkspaceDialogContent.tsx +7 -20
- package/client/features/settings/SettingsLayout.tsx +1 -1
- package/client/features/settings/WorkspaceSettings.tsx +4 -1
- package/client/features/views/ViewManager.tsx +14 -9
- package/client/features/widgets/WidgetFrame.tsx +1 -1
- package/client/features/widgets/Widgets.tsx +1 -3
- package/client/features/workspace/WorkspaceScreen.tsx +5 -1
- package/client/features/workspace/WorkspaceSplitLayout.tsx +6 -1
- package/client/features/workspace/api.ts +2 -4
- package/client/index.css +22 -29
- package/dist/chunk-245wt82v.css +1 -0
- package/dist/{chunk-tny85yt2.js → chunk-4s15axjs.js} +2 -2
- package/dist/{chunk-c9pjqx9m.js → chunk-53a7pxcz.js} +1 -1
- package/dist/{chunk-104m57qw.js → chunk-87thzbtw.js} +2 -2
- package/dist/chunk-a6jad1a6.js +1 -0
- package/dist/chunk-dghwstd2.js +9 -0
- package/dist/chunk-eg120aca.js +1 -0
- package/dist/{chunk-v7wr1df4.js → chunk-j3wvxjr7.js} +1 -1
- package/dist/chunk-j7hh2ab4.js +70 -0
- package/dist/chunk-w482ew2c.js +546 -0
- package/dist/chunk-y8eyahwx.js +1 -0
- package/dist/index.html +1 -1
- package/lib/format.ts +55 -6
- package/lib/themes.ts +6 -6
- package/lib/types.ts +10 -9
- package/package.json +12 -5
- package/registry.json +643 -0
- package/server/agent.ts +1 -1
- package/server/api.ts +26 -30
- package/server/applets.ts +30 -29
- package/server/bundler/applet-css.ts +7 -107
- package/server/bundler/build-applet.ts +5 -1
- package/server/bundler/build-worker.ts +178 -0
- package/server/cli-ui-components.ts +28 -33
- package/server/cli.ts +6 -11
- package/server/data-dir.ts +1 -1
- package/server/harness/README.md +41 -48
- package/server/harness/acp/NOTES.md +426 -0
- package/server/harness/acp/discovery.ts +27 -30
- package/server/harness/acp/model-state.ts +57 -0
- package/server/harness/acp/session.ts +18 -6
- package/server/harness/claude-code/NOTES.md +47 -12
- package/server/harness/claude-code/cli.ts +40 -0
- package/server/harness/claude-code/index.ts +11 -5
- package/server/harness/claude-code/models.ts +72 -19
- package/server/harness/claude-code/session.ts +408 -299
- package/server/harness/codex/NOTES.md +222 -350
- package/server/harness/codex/adapter.ts +94 -45
- package/server/harness/codex/auth.ts +1 -3
- package/server/harness/codex/client.ts +169 -249
- package/server/harness/codex/discovery.ts +9 -17
- package/server/harness/codex/index.ts +2 -1
- package/server/harness/codex/pagination.ts +24 -0
- package/server/harness/codex/permissions.ts +31 -7
- package/server/harness/codex/probe.ts +10 -13
- package/server/harness/codex/session.ts +549 -136
- package/server/harness/codex/transport.ts +184 -0
- package/server/harness/debug.ts +1 -1
- package/server/harness/hermes/NOTES.md +18 -0
- package/server/harness/hermes/discovery.ts +20 -0
- package/server/harness/hermes/index.ts +9 -0
- package/server/harness/hermes/models.ts +28 -8
- package/server/harness/types.ts +4 -2
- package/server/moi-scaffold.ts +1 -1
- package/server/preview.ts +3 -1
- package/server/registry.ts +63 -41
- package/server/tldraw-package.d.ts +4 -0
- package/server/ui-components.ts +101 -434
- package/server/view-builders.ts +2 -1
- package/server/web.ts +12 -5
- package/server/workspace-env.ts +3 -2
- package/tsconfig.json +0 -1
- package/ui-components/accordion.tsx +71 -0
- package/ui-components/alert-dialog.tsx +165 -0
- package/ui-components/alert.tsx +68 -0
- package/ui-components/attachment.tsx +195 -0
- package/ui-components/avatar.tsx +90 -0
- package/ui-components/badge.tsx +49 -0
- package/ui-components/button-group.tsx +78 -0
- package/ui-components/button.tsx +55 -0
- package/ui-components/calendar.tsx +180 -0
- package/ui-components/card.tsx +84 -0
- package/ui-components/carousel.tsx +235 -0
- package/ui-components/chart.tsx +338 -0
- package/ui-components/checkbox.tsx +28 -0
- package/ui-components/collapsible.tsx +15 -0
- package/ui-components/combobox.tsx +267 -0
- package/ui-components/context-menu.tsx +244 -0
- package/ui-components/dialog.tsx +138 -0
- package/ui-components/docs/accordion.md +463 -0
- package/ui-components/docs/alert-dialog.md +481 -0
- package/ui-components/docs/alert.md +301 -0
- package/ui-components/docs/attachment.md +689 -0
- package/ui-components/docs/avatar.md +495 -0
- package/ui-components/docs/badge.md +258 -0
- package/ui-components/docs/button-group.md +879 -0
- package/ui-components/docs/button.md +26 -0
- package/ui-components/docs/calendar.md +862 -0
- package/ui-components/docs/card.md +265 -0
- package/ui-components/docs/carousel.md +627 -0
- package/ui-components/docs/chart.md +1256 -0
- package/ui-components/docs/checkbox.md +477 -0
- package/ui-components/docs/collapsible.md +446 -0
- package/ui-components/docs/combobox.md +1003 -0
- package/ui-components/docs/context-menu.md +860 -0
- package/ui-components/docs/data-table.md +1580 -0
- package/ui-components/docs/date-picker.md +614 -0
- package/ui-components/docs/dialog.md +414 -0
- package/ui-components/docs/drawer.md +51 -0
- package/ui-components/docs/dropdown-menu.md +1000 -0
- package/ui-components/docs/field.md +1192 -0
- package/ui-components/docs/hover-card.md +275 -0
- package/ui-components/docs/input-group.md +866 -0
- package/ui-components/docs/input.md +456 -0
- package/ui-components/docs/label.md +295 -0
- package/ui-components/docs/pagination.md +416 -0
- package/ui-components/docs/popover.md +348 -0
- package/ui-components/docs/progress.md +214 -0
- package/ui-components/docs/radio-group.md +389 -0
- package/ui-components/docs/resizable.md +265 -0
- package/ui-components/docs/select.md +616 -0
- package/ui-components/docs/separator.md +216 -0
- package/ui-components/docs/skeleton.md +205 -0
- package/ui-components/docs/slider.md +226 -0
- package/ui-components/docs/spinner.md +332 -0
- package/ui-components/docs/switch.md +236 -0
- package/ui-components/docs/table.md +551 -0
- package/ui-components/docs/tabs.md +379 -0
- package/ui-components/docs/textarea.md +187 -0
- package/ui-components/docs/toggle-group.md +370 -0
- package/ui-components/docs/toggle.md +91 -0
- package/ui-components/docs/tooltip.md +290 -0
- package/ui-components/drawer.tsx +213 -0
- package/ui-components/dropdown-menu.tsx +263 -0
- package/ui-components/field.tsx +224 -0
- package/ui-components/hover-card.tsx +46 -0
- package/ui-components/input-group.tsx +146 -0
- package/ui-components/input.tsx +20 -0
- package/ui-components/label.tsx +17 -0
- package/ui-components/pagination.tsx +124 -0
- package/ui-components/popover.tsx +81 -0
- package/ui-components/progress.tsx +63 -0
- package/ui-components/radio-group.tsx +38 -0
- package/ui-components/resizable.tsx +40 -0
- package/ui-components/scoped-portal.tsx +31 -0
- package/ui-components/select.tsx +195 -0
- package/ui-components/separator.tsx +18 -0
- package/ui-components/skeleton.tsx +15 -0
- package/ui-components/slider.tsx +75 -0
- package/ui-components/spinner.tsx +20 -0
- package/ui-components/switch.tsx +27 -0
- package/ui-components/table.tsx +86 -0
- package/ui-components/tabs.tsx +75 -0
- package/ui-components/textarea.tsx +17 -0
- package/ui-components/toggle-group.tsx +85 -0
- package/ui-components/toggle.tsx +42 -0
- package/ui-components/tooltip.tsx +61 -0
- package/ui-components/utils.ts +8 -0
- package/workspace/.claude/skills/moi-workspace/SKILL.md +11 -20
- package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +4 -3
- package/workspace/.claude/skills/moi-workspace/references/UI-COMPONENTS.md +67 -203
- package/dist/chunk-59zf0m6n.js +0 -1
- package/dist/chunk-bj3akjs2.js +0 -1
- package/dist/chunk-j2w2vak4.js +0 -546
- package/dist/chunk-k2r9c95m.js +0 -10
- package/dist/chunk-kmbxhgwv.js +0 -1
- package/dist/chunk-p1yqa71k.js +0 -83
- package/dist/chunk-r5xrenjy.css +0 -1
|
@@ -10,6 +10,8 @@ import { useWorkspaceSkillUpdates } from './useWorkspaceSkillUpdates'
|
|
|
10
10
|
type WorkspaceComposerStateOptions = {
|
|
11
11
|
chatError: string | null
|
|
12
12
|
onDismissChatError: () => void
|
|
13
|
+
chatLoadError?: string | null
|
|
14
|
+
onRetryChatLoad?: () => void
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
type WorkspaceComposerState = {
|
|
@@ -20,7 +22,7 @@ type WorkspaceComposerState = {
|
|
|
20
22
|
|
|
21
23
|
export function useWorkspaceComposerState(
|
|
22
24
|
workspaceId: string,
|
|
23
|
-
{ chatError, onDismissChatError }: WorkspaceComposerStateOptions
|
|
25
|
+
{ chatError, onDismissChatError, chatLoadError, onRetryChatLoad }: WorkspaceComposerStateOptions
|
|
24
26
|
): WorkspaceComposerState {
|
|
25
27
|
const { data: agent, error } = useWorkspaceAgent(workspaceId)
|
|
26
28
|
const availability = agent?.availability
|
|
@@ -43,12 +45,18 @@ export function useWorkspaceComposerState(
|
|
|
43
45
|
)
|
|
44
46
|
}
|
|
45
47
|
: undefined
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
48
|
+
let chatErrorBanner: ComposerBanner | undefined
|
|
49
|
+
if (chatLoadError) {
|
|
50
|
+
chatErrorBanner = {
|
|
51
|
+
tone: 'error',
|
|
52
|
+
content: <ErrorBanner error={chatLoadError} onRetry={onRetryChatLoad} />
|
|
53
|
+
}
|
|
54
|
+
} else if (chatError) {
|
|
55
|
+
chatErrorBanner = {
|
|
56
|
+
tone: 'error',
|
|
57
|
+
content: <ErrorBanner error={chatError} onDismiss={onDismissChatError} />
|
|
58
|
+
}
|
|
59
|
+
}
|
|
52
60
|
const skillUpdate: ComposerBanner | undefined = skillUpdateBanner
|
|
53
61
|
? {
|
|
54
62
|
tone: 'default',
|
|
@@ -22,6 +22,17 @@ function mergeAssistantTurns(first: Turn, next: Turn): Turn {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// Saved history is already grouped. A token update only changes its trailing
|
|
26
|
+
// assistant run; all completed rows keep their identities for React.memo.
|
|
27
|
+
export function appendPreviewTurn(grouped: Turn[], preview: Turn | null | undefined): Turn[] {
|
|
28
|
+
if (!preview) return grouped
|
|
29
|
+
const last = grouped.at(-1)
|
|
30
|
+
if (last?.role === 'assistant') {
|
|
31
|
+
return [...grouped.slice(0, -1), mergeAssistantTurns(last, preview)]
|
|
32
|
+
}
|
|
33
|
+
return [...grouped, preview]
|
|
34
|
+
}
|
|
35
|
+
|
|
25
36
|
export function groupTurns(turns: Turn[]): Turn[] {
|
|
26
37
|
const out: Turn[] = []
|
|
27
38
|
for (const t of turns) {
|
|
@@ -43,6 +54,7 @@ export function groupTurns(turns: Turn[]): Turn[] {
|
|
|
43
54
|
const previous = out[index - 1]
|
|
44
55
|
if (
|
|
45
56
|
turn.role !== 'assistant' ||
|
|
57
|
+
turn.meta?.durationMs !== undefined ||
|
|
46
58
|
previous?.role !== 'user' ||
|
|
47
59
|
previous.origin.kind !== 'user-input' ||
|
|
48
60
|
!previous.timestamp ||
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// Weaves transcript notices (context compaction, mid-session model switches)
|
|
2
2
|
// into the turn list so each one reads at the moment it happened.
|
|
3
3
|
//
|
|
4
|
-
// Only
|
|
5
|
-
// kind is claude-code-specific plumbing with no designed chat treatment yet,
|
|
6
|
-
// so `chatNoticeLabel` skips it explicitly.
|
|
4
|
+
// Only notices with a chat label enter the timeline.
|
|
7
5
|
import type { SystemNotice, Turn } from '@/lib/types'
|
|
8
6
|
|
|
9
7
|
export type ChatTimelineItem =
|
|
@@ -13,16 +11,19 @@ export type ChatTimelineItem =
|
|
|
13
11
|
// One-line copy for a notice row; null = this kind does not render in chat.
|
|
14
12
|
export function chatNoticeLabel(notice: SystemNotice): string | null {
|
|
15
13
|
switch (notice.kind) {
|
|
14
|
+
case 'warning':
|
|
15
|
+
return notice.message
|
|
16
16
|
case 'compact':
|
|
17
17
|
return 'Context compacted'
|
|
18
18
|
case 'model-change':
|
|
19
19
|
return notice.prev
|
|
20
20
|
? `Model changed to ${notice.model} (was ${notice.prev})`
|
|
21
21
|
: `Model changed to ${notice.model}`
|
|
22
|
+
case 'api-retry':
|
|
23
|
+
return notice.error ? `Retrying: ${notice.error}` : 'Retrying the connection'
|
|
22
24
|
// Claude-code-specific notices without a designed chat treatment yet —
|
|
23
25
|
// skipped on purpose. New kinds stay hidden until designed.
|
|
24
26
|
case 'rate-limit':
|
|
25
|
-
case 'api-retry':
|
|
26
27
|
case 'hook':
|
|
27
28
|
case 'session-state':
|
|
28
29
|
case 'files-persisted':
|
|
@@ -44,13 +45,8 @@ function parseTime(value: string | undefined): number | undefined {
|
|
|
44
45
|
// notices never jump ahead of undated turns. Notices with no parseable `at`
|
|
45
46
|
// have no comparable anchor and go after the last turn.
|
|
46
47
|
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
// right while a session is live (compaction happens at the current end of the
|
|
50
|
-
// conversation) but drifts on replay: the notice follows the new end instead of
|
|
51
|
-
// staying where it happened. Codex hits this today — `codexItemToTurn` sets no
|
|
52
|
-
// `timestamp` and `codexItemToNotice` stamps `at` with replay-time `new Date()`
|
|
53
|
-
// — so fixing it means giving those rows a real anchor, not changing the merge.
|
|
48
|
+
// Entirely undated transcripts cannot anchor notices. Adapters must supply
|
|
49
|
+
// native timestamps when available; otherwise dated notices follow all turns.
|
|
54
50
|
export function interleaveNotices(turns: Turn[], notices: SystemNotice[]): ChatTimelineItem[] {
|
|
55
51
|
const shown = notices.filter(notice => chatNoticeLabel(notice) !== null)
|
|
56
52
|
if (shown.length === 0) return turns.map((turn): ChatTimelineItem => ({ kind: 'turn', turn }))
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { queryOptions, type QueryClient } from '@tanstack/react-query'
|
|
2
|
+
|
|
3
|
+
import { requestJson } from '@/client/api/http'
|
|
4
|
+
import { workspaceKeys } from '@/client/api/workspace-keys'
|
|
5
|
+
import { applyEvents } from '@/lib/format'
|
|
6
|
+
import type { StreamEvent } from '@/lib/types'
|
|
7
|
+
|
|
8
|
+
type PendingFetch = {
|
|
9
|
+
workspaceId: string
|
|
10
|
+
sessionId: string
|
|
11
|
+
events: StreamEvent[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const pendingFetches = new WeakMap<QueryClient, Set<PendingFetch>>()
|
|
15
|
+
|
|
16
|
+
// Keep socket events that arrive after an HTTP snapshot starts loading. This
|
|
17
|
+
// also covers the first load, before there is any cached view to patch.
|
|
18
|
+
export function bufferSessionEvent(
|
|
19
|
+
client: QueryClient,
|
|
20
|
+
workspaceId: string,
|
|
21
|
+
sessionId: string,
|
|
22
|
+
event: StreamEvent
|
|
23
|
+
) {
|
|
24
|
+
for (const pending of pendingFetches.get(client) ?? []) {
|
|
25
|
+
if (pending.workspaceId === workspaceId && pending.sessionId === sessionId) {
|
|
26
|
+
pending.events.push(event)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function sessionViewOptions(workspaceId: string, sessionId: string) {
|
|
32
|
+
return queryOptions({
|
|
33
|
+
queryKey: workspaceKeys.events(workspaceId, sessionId),
|
|
34
|
+
queryFn: async ({ client, signal }) => {
|
|
35
|
+
const requests = pendingFetches.get(client) ?? new Set<PendingFetch>()
|
|
36
|
+
pendingFetches.set(client, requests)
|
|
37
|
+
const pending: PendingFetch = { workspaceId, sessionId, events: [] }
|
|
38
|
+
requests.add(pending)
|
|
39
|
+
try {
|
|
40
|
+
const events = await requestJson<StreamEvent[]>(
|
|
41
|
+
`/api/workspaces/${workspaceId}/sessions/${sessionId}/events`,
|
|
42
|
+
{ signal },
|
|
43
|
+
'Couldn’t load chat'
|
|
44
|
+
)
|
|
45
|
+
return applyEvents([...events, ...pending.events])
|
|
46
|
+
} finally {
|
|
47
|
+
requests.delete(pending)
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
staleTime: Infinity,
|
|
51
|
+
gcTime: 5 * 60_000
|
|
52
|
+
})
|
|
53
|
+
}
|
|
@@ -152,10 +152,7 @@ function ToolRow({ isFirst, isLast, call, leading, marker, name, brief, preview
|
|
|
152
152
|
// anything follows it (a text/tool row makes it no longer the last row, so
|
|
153
153
|
// `inProgress` goes false and it reverts to the user's collapsed default).
|
|
154
154
|
//
|
|
155
|
-
//
|
|
156
|
-
// (Anthropic `redacted_thinking`; the OpenClaw codex app-server, which sends a
|
|
157
|
-
// Reasoning item with timing only). Those rows have nothing to expand, so they
|
|
158
|
-
// render as a bare label — "Thought for 1.2s" — with no chevron.
|
|
155
|
+
// Reasoning without visible text renders as a duration label with no chevron.
|
|
159
156
|
type ReasoningRowProps = RowPosition & {
|
|
160
157
|
text: string
|
|
161
158
|
inProgress?: boolean
|
|
@@ -103,7 +103,10 @@ function brief(call: ToolCall, shorten: Shorten): string {
|
|
|
103
103
|
if (Array.isArray(queries) && queries.length > 0) {
|
|
104
104
|
return queries.filter((q): q is string => typeof q === 'string').join(' · ')
|
|
105
105
|
}
|
|
106
|
-
return
|
|
106
|
+
return (
|
|
107
|
+
getInputValue(input, 'query') ||
|
|
108
|
+
[getInputValue(input, 'url'), getInputValue(input, 'pattern')].filter(Boolean).join(' · ')
|
|
109
|
+
)
|
|
107
110
|
}
|
|
108
111
|
if (tool === 'update_plan') {
|
|
109
112
|
const plan = input.plan
|
|
@@ -66,20 +66,21 @@ export function useChat(address: WorkspaceTabAddress) {
|
|
|
66
66
|
const activity = useLive(s =>
|
|
67
67
|
selectedSessionId ? (s.activity[`${workspaceId}:${selectedSessionId}`] ?? 'idle') : 'idle'
|
|
68
68
|
)
|
|
69
|
-
// Only
|
|
70
|
-
// user input) deliberately renders like idle until it gets its own UI.
|
|
69
|
+
// Only running shows the loader/Stop.
|
|
71
70
|
const processing = isRunningActivity(activity)
|
|
72
71
|
const error = useLive(s =>
|
|
73
72
|
selectedSessionId ? (s.errors[`${workspaceId}:${selectedSessionId}`] ?? null) : null
|
|
74
73
|
)
|
|
75
74
|
|
|
76
75
|
const viewQuery = useSessionView(workspaceId, selectedSessionId)
|
|
76
|
+
const { refetch } = viewQuery
|
|
77
|
+
const retryLoad = useCallback(() => void refetch(), [refetch])
|
|
77
78
|
const view = viewQuery.data ?? EMPTY
|
|
78
79
|
const chatLoaded =
|
|
79
80
|
sessions !== undefined && (selectedSessionId === null || viewQuery.data !== undefined)
|
|
80
81
|
|
|
81
82
|
// The live streaming preview as a synthetic assistant turn, so the ChatPanel
|
|
82
|
-
// can
|
|
83
|
+
// can merge it into the trailing assistant run — a
|
|
83
84
|
// thinking-only preview then folds into the current tool group instead of
|
|
84
85
|
// rendering as a detached block. The selector returns the stored root-preview
|
|
85
86
|
// object for THIS session (not the whole slice): deltas for other sessions
|
|
@@ -136,12 +137,10 @@ export function useChat(address: WorkspaceTabAddress) {
|
|
|
136
137
|
parts
|
|
137
138
|
})
|
|
138
139
|
|
|
139
|
-
//
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
//
|
|
143
|
-
// When the model is unknown/default we can't validate either capability,
|
|
144
|
-
// so pass the stored choices through.
|
|
140
|
+
// Resolve the session/workspace choice against the catalog. Codex sends
|
|
141
|
+
// the picker's concrete model even for an implicit or stale selection;
|
|
142
|
+
// otherwise its config or resumed thread can choose a different model.
|
|
143
|
+
// Validate effort and Fast mode against that same resolved row.
|
|
145
144
|
const pickedModel = sessionConfig?.model ?? layout.selectedModel
|
|
146
145
|
const pickedEffort = sessionConfig?.effort ?? layout.selectedEffort
|
|
147
146
|
const pickedFastMode = sessionConfig?.fastMode ?? layout.selectedFastMode
|
|
@@ -210,6 +209,8 @@ export function useChat(address: WorkspaceTabAddress) {
|
|
|
210
209
|
sessionId: selectedSessionId,
|
|
211
210
|
processing,
|
|
212
211
|
error,
|
|
212
|
+
loadError: viewQuery.error?.message ?? null,
|
|
213
|
+
retryLoad,
|
|
213
214
|
send,
|
|
214
215
|
stop,
|
|
215
216
|
selectSession,
|
|
@@ -336,7 +336,9 @@ export function ChatStatesPage() {
|
|
|
336
336
|
</div>
|
|
337
337
|
|
|
338
338
|
<details className="mt-16 border-t border-border pt-6 text-xs text-muted-foreground">
|
|
339
|
-
<summary className="cursor-pointer font-medium
|
|
339
|
+
<summary className="cursor-pointer list-none font-medium marker:hidden [&::-webkit-details-marker]:hidden">
|
|
340
|
+
Notes for designers
|
|
341
|
+
</summary>
|
|
340
342
|
<ul className="mt-3 flex list-disc flex-col gap-1.5 pl-4">
|
|
341
343
|
<li>
|
|
342
344
|
User bubbles render markdown verbatim (whitespace preserved, no markdown parsing)
|
|
@@ -23,6 +23,11 @@ const DEV_ROUTES: DevRouteEntry[] = [
|
|
|
23
23
|
title: 'Tool calls',
|
|
24
24
|
description: 'Tool-call group fixtures: single and merged runs, live states, subagent traces.'
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
path: '/dev/ui-components',
|
|
28
|
+
title: 'UI components',
|
|
29
|
+
description: 'Interactive previews for every component in the local moi registry.'
|
|
30
|
+
},
|
|
26
31
|
{
|
|
27
32
|
path: '/dev/textures',
|
|
28
33
|
title: 'Texture lab',
|
|
@@ -6,6 +6,7 @@ import { DevIndexPage } from './DevIndexPage'
|
|
|
6
6
|
import { HarnessDebugPage } from './HarnessDebugPage'
|
|
7
7
|
import { TextureLabPage } from './TextureLabPage'
|
|
8
8
|
import { ToolCallsPage } from './ToolCallsPage'
|
|
9
|
+
import { UiComponentsPage } from './UiComponentsPage'
|
|
9
10
|
|
|
10
11
|
// All /dev/* routes, colocated with their pages so the whole dev playground
|
|
11
12
|
// (and its dependencies) lives in this folder and loads as one lazy chunk —
|
|
@@ -19,6 +20,7 @@ export default function DevRoutes() {
|
|
|
19
20
|
<Route path="/dev/chat-states" component={ChatStatesPage} />
|
|
20
21
|
<Route path="/dev/tool-calls" component={ToolCallsPage} />
|
|
21
22
|
<Route path="/dev/textures" component={TextureLabPage} />
|
|
23
|
+
<Route path="/dev/ui-components" component={UiComponentsPage} />
|
|
22
24
|
<Route path="/dev" component={DevIndexPage} />
|
|
23
25
|
</Switch>
|
|
24
26
|
)
|
|
@@ -99,7 +99,7 @@ type LogRowProps = {
|
|
|
99
99
|
function LogRow({ time, badge, badgeClass, label, body }: LogRowProps) {
|
|
100
100
|
return (
|
|
101
101
|
<details className="group border-b border-border/40 px-2 py-1 text-[11px] leading-tight">
|
|
102
|
-
<summary className="flex cursor-pointer items-baseline gap-2 font-mono whitespace-nowrap">
|
|
102
|
+
<summary className="flex cursor-pointer list-none items-baseline gap-2 font-mono whitespace-nowrap marker:hidden [&::-webkit-details-marker]:hidden">
|
|
103
103
|
<span className="text-muted-foreground/60 tabular-nums">{ts(time)}</span>
|
|
104
104
|
<span className={cn('rounded px-1 font-semibold', badgeClass)}>{badge}</span>
|
|
105
105
|
<span className="shrink-0 font-semibold">{label}</span>
|