Enable
SetincludePartialMessages: true in options:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
includePartialMessages: true in options:
import { qodercliAuth, query } from '@qoder-ai/qoder-agent-sdk';
const q = query({
prompt: 'Write a short analysis report',
options: {
auth: qodercliAuth(),
includePartialMessages: true,
},
});
for await (const msg of q) {
if (msg.type === 'stream_event') {
const delta = msg.event.delta;
if (delta?.type === 'text_delta') {
process.stdout.write(delta.text);
}
}
}
if (delta?.type === 'thinking_delta') {
process.stdout.write(delta.thinking);
}
if (delta?.type === 'input_json_delta') {
process.stdout.write(delta.partial_json);
}