Skip to main content

PromptDraftClient

adaline.prompts.draft reads the current working draft of a prompt — the unsaved version shown in the editor before a save is applied. Today the only operation is get; the sub-namespace exists to leave room for future draft mutations without reshuffling call sites.

Access

import { Adaline } from '@adaline/client';

const adaline = new Adaline();
const draft = adaline.prompts.draft; // PromptDraftClient
The class is also exported directly:
import { PromptDraftClient } from '@adaline/client';
Types from @adaline/api:
import type { PromptDraft } from '@adaline/api';

get()

Get the current draft for a prompt — the unsaved working version shown in the editor before a save.
get(options: { promptId: string }): Promise<PromptDraft>

Parameters

NameTypeRequiredDescription
promptIdstringYesPrompt identifier.

Returns

Promise<PromptDraft> with config, messages, tools, and variables mirroring the PromptSnapshot shape.

Example

const draft = await adaline.prompts.draft.get({ promptId: 'prompt_abc123' });

console.log(draft.config.model);
console.log(draft.messages);

See Also