chore fixed typecheck

This commit is contained in:
Dustin
2025-06-25 15:20:44 -04:00
parent 9c1002b128
commit f6d2fd78e8
2 changed files with 3 additions and 20 deletions

View File

@@ -5,6 +5,7 @@ import { getAPIKey } from '~/lib/.server/llm/api-key';
import { getAnthropicModel } from '~/lib/.server/llm/model';
interface ToolResult<Name extends string, Args, Result> {
state: 'result';
toolCallId: string;
toolName: Name;
args: Args;

View File

@@ -1,11 +1,7 @@
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
import { parseDataStreamPart } from 'ai';
import { streamText } from '~/lib/.server/llm/stream-text';
import { stripIndents } from '~/utils/stripIndent';
const encoder = new TextEncoder();
const decoder = new TextDecoder();
export async function action(args: ActionFunctionArgs) {
return enhancerAction(args);
}
@@ -32,23 +28,9 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
context.cloudflare.env,
);
const transformStream = new TransformStream({
transform(chunk, controller) {
const processedChunk = decoder
.decode(chunk)
.split('\n')
.filter((line) => line !== '')
.map(parseDataStreamPart)
.map((part) => part.value)
.join('');
controller.enqueue(encoder.encode(processedChunk));
},
});
/*
/**
* WARNING: toAIStream has been removed from streamText
* See migration guide at https://sdk.vercel.ai/docs/migrations
* See migration guide at https://sdk.vercel.ai/docs/migrations.
*/
// result.toDataStream().pipeThrough(transformStream);