Aller au contenu principal

Interface: KernelChatsApi

Defined in: packages/plugin-sdk/src/kernel/authoring.ts:260

Properties

draft

readonly draft: KernelChatDraftApi

Defined in: packages/plugin-sdk/src/kernel/authoring.ts:277

Methods

append()

append(options): Promise<{ messageId: string; }>

Defined in: packages/plugin-sdk/src/kernel/authoring.ts:272

Append a plugin-role message (capability chats.write.plugin). idempotencyKey dedupes retried appends: a replay returns the original message instead of duplicating it (rev4 stage 3 outbox).

Parameters

options
chatId?

string

content

string

idempotencyKey?

string

Returns

Promise<{ messageId: string; }>


current()

current(): Promise<KernelChatInfo | null>

Defined in: packages/plugin-sdk/src/kernel/authoring.ts:261

Returns

Promise<KernelChatInfo | null>


listMessages()

listMessages(options?): Promise<Pick<CursorPage<{ activeVariantPosition: number | null; branchId: string; chatId: string; checkpointChatId: string | null; content: string; contentRevisionCount: number; createdAt: number; id: string; meta: {[key: string]: unknown; }; name: string | null; parentId: string | null; revision: number; role: "system" | "user" | "assistant" | "tool" | "plugin"; updatedAt: number | null; variantCount: number; }>, "items" | "nextCursor">>

Defined in: packages/plugin-sdk/src/kernel/authoring.ts:262

Parameters

options?
chatId?

string

cursor?

string

limit?

number

Returns

Promise<Pick<CursorPage<{ activeVariantPosition: number | null; branchId: string; chatId: string; checkpointChatId: string | null; content: string; contentRevisionCount: number; createdAt: number; id: string; meta: {[key: string]: unknown; }; name: string | null; parentId: string | null; revision: number; role: "system" | "user" | "assistant" | "tool" | "plugin"; updatedAt: number | null; variantCount: number; }>, "items" | "nextCursor">>