fix(coding): preserve runtime model and failure contracts
This commit is contained in:
@@ -2,8 +2,6 @@ import type {
|
||||
CodingConversationRuntime,
|
||||
CodingRuntimeCommand,
|
||||
CodingRuntimeDiagnostics,
|
||||
CodingRuntimeErrorCode,
|
||||
CodingRuntimePublicError,
|
||||
ConversationModelState,
|
||||
ConversationInteraction,
|
||||
ConversationInteractionResponse,
|
||||
@@ -22,22 +20,14 @@ import type {
|
||||
SetConversationModelInput,
|
||||
SetThinkingLevelInput,
|
||||
} from './contracts';
|
||||
import { CodingRuntimeContractError } from './runtime-errors';
|
||||
export { CodingRuntimeContractError } from './runtime-errors';
|
||||
import {
|
||||
createConversationReducerState,
|
||||
reduceConversationPatch,
|
||||
type ConversationReducerState,
|
||||
} from './conversation-reducer';
|
||||
|
||||
export class CodingRuntimeContractError extends Error {
|
||||
readonly publicError: CodingRuntimePublicError;
|
||||
|
||||
constructor(code: CodingRuntimeErrorCode, message: string, recoverable: boolean) {
|
||||
super(message);
|
||||
this.name = 'CodingRuntimeContractError';
|
||||
this.publicError = { code, message, recoverable };
|
||||
}
|
||||
}
|
||||
|
||||
export interface InMemoryConversationRuntimeOptions {
|
||||
snapshots?: ConversationSnapshot[];
|
||||
commands?: CodingRuntimeCommand[];
|
||||
|
||||
Reference in New Issue
Block a user