Instead of treating LLM logging as simply writing lines of text sequentially, emit a stream of typed data objects that include rich information about the interaction, such as timestamps, message types, tool calls, etc. These are then collected by a new custom webview in the vscode extension (the "Continue Console"), allowing a user or developer to browse through the different interactions and view them in detail. In progress interactions are now streamed live, instead of being held back to avoid concurrency issues. This webview could be also exposed for IntelliJ or file logging could be reimplemented on top of the new framework.
29 lines
765 B
TypeScript
29 lines
765 B
TypeScript
import { ConfigHandler } from "../config/ConfigHandler";
|
|
import { ControlPlaneClient } from "../control-plane/client";
|
|
import Mock from "../llm/llms/Mock";
|
|
import { LLMLogger } from "../llm/logger";
|
|
import FileSystemIde from "../util/filesystem";
|
|
|
|
import { TEST_DIR } from "./testDir";
|
|
|
|
export const testIde = new FileSystemIde(TEST_DIR);
|
|
|
|
export const ideSettingsPromise = testIde.getIdeSettings();
|
|
|
|
export const testControlPlaneClient = new ControlPlaneClient(
|
|
Promise.resolve(undefined),
|
|
ideSettingsPromise,
|
|
);
|
|
|
|
export const testConfigHandler = new ConfigHandler(
|
|
testIde,
|
|
ideSettingsPromise,
|
|
new LLMLogger(),
|
|
Promise.resolve(undefined),
|
|
);
|
|
|
|
export const testLLM = new Mock({
|
|
model: "mock-model",
|
|
title: "Mock LLM",
|
|
uniqueId: "not-unique",
|
|
});
|