feat: update Makelore modules and conversations
This commit is contained in:
@@ -128,6 +128,14 @@ export interface OpencodeSession extends Record<string, unknown> {
|
||||
summary?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
projectID?: string;
|
||||
directory?: string;
|
||||
parentID?: string;
|
||||
time?: {
|
||||
created?: number;
|
||||
updated?: number;
|
||||
compacting?: number;
|
||||
};
|
||||
share?: { url?: string };
|
||||
revert?: { messageID?: string; partID?: string };
|
||||
}
|
||||
@@ -216,3 +224,90 @@ export interface OpencodePermissionRequest {
|
||||
tool?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The native OpenCode session Part kinds that can arrive over the event bus.
|
||||
* Keep this union deliberately wider than the renderer's legacy ContentBlock
|
||||
* union so newer runtime parts can remain visible through the generic card.
|
||||
*/
|
||||
export type OpencodeNativePartKind =
|
||||
| 'text'
|
||||
| 'reasoning'
|
||||
| 'tool'
|
||||
| 'step-start'
|
||||
| 'step-finish'
|
||||
| 'retry'
|
||||
| 'subtask'
|
||||
| 'agent'
|
||||
| 'patch'
|
||||
| 'file'
|
||||
| 'snapshot'
|
||||
| 'compaction'
|
||||
| 'unknown';
|
||||
|
||||
export type OpencodeNativeToolState =
|
||||
| 'pending'
|
||||
| 'running'
|
||||
| 'completed'
|
||||
| 'error';
|
||||
|
||||
export interface OpencodeNormalizedToolState {
|
||||
status: OpencodeNativeToolState;
|
||||
input?: unknown;
|
||||
output?: unknown;
|
||||
error?: unknown;
|
||||
metadata?: Record<string, unknown>;
|
||||
time?: {
|
||||
start?: number;
|
||||
end?: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface OpencodeNormalizedSessionPart {
|
||||
id: string;
|
||||
sessionID: string;
|
||||
messageID: string;
|
||||
type: OpencodeNativePartKind;
|
||||
rawType: string;
|
||||
text?: string;
|
||||
synthetic?: boolean;
|
||||
tool?: string;
|
||||
callID?: string;
|
||||
state?: OpencodeNormalizedToolState;
|
||||
detail?: string;
|
||||
parentID?: string;
|
||||
childSessionID?: string;
|
||||
time?: {
|
||||
start?: number;
|
||||
end?: number;
|
||||
};
|
||||
raw?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface OpencodeNormalizedSessionMessage {
|
||||
id: string;
|
||||
sessionID: string;
|
||||
role: string;
|
||||
createdAt?: number;
|
||||
completedAt?: number;
|
||||
partIDs: string[];
|
||||
}
|
||||
|
||||
export interface OpencodeSessionTranscriptState {
|
||||
sessionID: string;
|
||||
status: OpencodeSessionExecutionState;
|
||||
messagesById: Record<string, OpencodeNormalizedSessionMessage>;
|
||||
messageOrder: string[];
|
||||
partsById: Record<string, OpencodeNormalizedSessionPart>;
|
||||
partOrderByMessageId: Record<string, string[]>;
|
||||
lastError?: string;
|
||||
lastEventKey?: string;
|
||||
lastDeltaSignature?: string;
|
||||
/** Bounded event identity cache used to make reconnect replays idempotent. */
|
||||
seenEventKeys?: string[];
|
||||
}
|
||||
|
||||
// Public architecture names used by the session UI plan. Keep the prefixed
|
||||
// aliases above for compatibility with the rest of the OpenCode type surface.
|
||||
export type NormalizedSessionPart = OpencodeNormalizedSessionPart;
|
||||
export type SessionTranscriptState = OpencodeSessionTranscriptState;
|
||||
|
||||
Reference in New Issue
Block a user