Files
openmotion/shared/asset-chat.ts
Tom Huang acb80e4095 feat: add an asset workspace with generation, versions, and editor import (#413)
* feat: add a shared asset workspace with generation and version history

Unify direct model jobs and embedded Codex conversations around shared asset operations exposed through MCP. Add reusable media uploads, pinned references, version browsing, trash undo, and verified project imports.

Refine compact creation controls, persistent task history, solid menus, and stable resizable preview layouts. Integrate asset navigation with main's history and deep links, and align onboarding, tracking, documentation, and distribution.

* test: exercise openmotion_assets in the packaged phase-one e2e

The phase-one profile now exposes openmotion_assets, but the packaged
distribution smoke test still asserted that every public Tool was called
without ever invoking it, so the Distribution regression lane failed.

Import a real audio file into the library, read it back by asset and
version, list it by modality, and import the pinned version into the
project so the new Tool is covered end to end.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: preserve asset request receipts and pending draft edits

Exercise asset library replay in the packaged MCP smoke test and align compact control documentation with verified shared geometry.
2026-11-15 23:24:33 +08:00

13 lines
885 B
TypeScript

import type { AssetReference } from './asset-library.ts';
export interface AssetChatMessage { id: string; role: 'user' | 'assistant' | 'tool'; text: string; createdAt: number }
export interface AssetChatApproval { id: string; kind: 'generation' | 'command' | 'file'; title: string; detail: string }
export interface AssetChat {
id: string; title: string; createdAt: number; updatedAt: number; threadId?: string;
state: 'idle' | 'running' | 'waiting' | 'failed' | 'cancelled';
messages: AssetChatMessage[]; approvals: AssetChatApproval[]; error?: string;
requestReceipts?: { requestId: string; inputHash: string }[];
/** Retained for conversations persisted before per-turn receipts. */
lastRequestId?: string; lastRequestHash?: string;
}
export interface AssetChatInput { requestId: string; text: string; references?: AssetReference[]; model?: string; reasoning?: string }