@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
27 lines • 874 B
TypeScript
import type { ModelMessage } from 'ai';
import type { StreamCallbacks } from '../../types/index.js';
/**
* Creates the onStepFinish callback for AI SDK generateText
* Since tools have no execute functions, this only handles logging.
*/
export declare function createOnStepFinishHandler(_callbacks: StreamCallbacks): (step: {
toolCalls?: Array<{
toolCallId?: string;
toolName: string;
input: unknown;
}>;
toolResults?: Array<{
output: unknown;
}>;
text?: string;
}) => void;
/**
* Creates the prepareStep callback for AI SDK generateText
* This filters out empty assistant messages and orphaned tool results
*/
export declare function createPrepareStepHandler(): (params: {
messages: ModelMessage[];
}) => {
messages?: ModelMessage[];
} | Record<string, never>;
//# sourceMappingURL=streaming-handler.d.ts.map