feat: update Makelore modules and conversations
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-07-31 10:08:41 +08:00
parent b8ca3f8eea
commit 80e8386fa6
175 changed files with 8036 additions and 10581 deletions

View File

@@ -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;