Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c94efcc
updated to use cosmos db instead of mongo db
robgruen Feb 3, 2026
b8b8160
lint
robgruen Feb 3, 2026
30432c6
can swap between mongo db and cosmos db
robgruen Feb 3, 2026
9aeb281
Merge branch 'main' into dev/robgruen/mongodb_migration
robgruen Feb 3, 2026
9351a01
Merge branch 'main' into dev/robgruen/mongodb_migration
robgruen Feb 3, 2026
07664b7
pnpm package upgrade
robgruen Feb 4, 2026
aa9597b
upgraded electron builder version #
robgruen Feb 4, 2026
0c51412
Merge branch 'main' into dev/robgruen/mongodb_migration
robgruen Feb 4, 2026
76359ed
refactored promptlogger into telemetry to reduce dependency chain len…
robgruen Feb 4, 2026
8f174be
lint
robgruen Feb 4, 2026
5afc2e4
Merge branch 'main' into dev/robgruen/mongodb_migration
robgruen Feb 4, 2026
f73eb8d
small refactor
robgruen Feb 5, 2026
af99e40
merged
robgruen Feb 5, 2026
8ebc055
updated lock file
robgruen Feb 5, 2026
4ef6287
Merge branch 'main' into dev/robgruen/mongodb_migration
robgruen Feb 6, 2026
fa0fc80
fixed lock file.
robgruen Feb 6, 2026
a75d633
Merge remote-tracking branch 'origin' into dev/robgruen/mongodb_migra…
robgruen Feb 6, 2026
3a84bc2
abstracted cosmos dependencies into an interface and that gets called…
robgruen Feb 6, 2026
17179be
prompt logger now externalized. Prompt logger now part of the system…
robgruen Feb 7, 2026
c276d91
merged
robgruen Feb 7, 2026
2d7277e
updated lock file
robgruen Feb 7, 2026
f8602ea
Merge branch 'main' into dev/robgruen/mongodb_migration2
robgruen Feb 7, 2026
3c52c5c
ling
robgruen Feb 7, 2026
c639596
Merge branch 'dev/robgruen/mongodb_migration2' of https://github.com/…
robgruen Feb 7, 2026
a4cf71a
remove dependencies to mimize chain
robgruen Feb 18, 2026
1831bb1
testing fixes
robgruen Feb 18, 2026
f027b8b
updated mirror
robgruen Feb 18, 2026
afbaba0
merged
robgruen Feb 18, 2026
71479a2
updated lock file
robgruen Feb 18, 2026
b975fec
merged
robgruen Feb 18, 2026
b7f9880
updated lock file
robgruen Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ts/examples/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"knowpro-test": "workspace:*",
"memory-providers": "workspace:*",
"memory-storage": "workspace:*",
"telemetry": "workspace:*",
"textpro": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1",
Expand Down
10 changes: 9 additions & 1 deletion ts/examples/chat/src/codeChat/codeChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import {
sampleFiles,
} from "./common.js";
import { createCommandTransformer } from "./commandTransformer.js";
import { createPromptLogger } from "telemetry";

const promptLogger = createPromptLogger();

export async function runCodeChat(): Promise<void> {
const model = openai.createChatModelDefault("codeChat");
Expand Down Expand Up @@ -381,7 +384,12 @@ export async function runCodeChat(): Promise<void> {
async function regex(args: string[], io: InteractiveIo): Promise<void> {
if (args.length > 0) {
const prompt = `Return a Typescript regular expression for the following:\n ${args.join(" ")}`;
const result = await codeReviewer.model.complete(prompt);
const result = await codeReviewer.model.complete(
prompt,
undefined,
undefined,
promptLogger.logModelRequest,
);
if (result.success) {
io.writer.writeLine(result.data);
} else {
Expand Down
1 change: 1 addition & 0 deletions ts/examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"copyfiles": "^2.4.1",
"dotenv": "^16.3.1",
"interactive-app": "workspace:*",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1",
"typescript": "~5.4.5"
Expand Down
10 changes: 9 additions & 1 deletion ts/examples/playground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ import {
} from "typeagent";
import { PromptSection } from "typechat";
import * as fs from "fs";
import { createPromptLogger } from "telemetry";

const promptLogger = createPromptLogger();

const envPath = new URL("../../../.env", import.meta.url);
dotenv.config({ path: envPath });
Expand Down Expand Up @@ -188,7 +191,12 @@ async function runPlayground(): Promise<void> {
),
userMessage,
];
const chatResponse = await chatModel.complete(context);
const chatResponse = await chatModel.complete(
context,
undefined,
undefined,
promptLogger.logModelRequest,
);
if (chatResponse.success) {
const responseText = chatResponse.data;
io.writer.writeLine(responseText);
Expand Down
1 change: 1 addition & 0 deletions ts/examples/vscodeSchemaGen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"debug": "^4.4.0",
"dotenv": "^16.3.1",
"fastest-levenshtein": "^1.0.16",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1"
},
Expand Down
10 changes: 9 additions & 1 deletion ts/examples/vscodeSchemaGen/src/schemaGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import * as path from "path";
import dotenv from "dotenv";
import * as fs from "fs";
import { finished } from "stream/promises";
import { createPromptLogger } from "telemetry";

const promptLogger = createPromptLogger();

import {
ChatModel,
Expand All @@ -23,7 +26,12 @@ async function getModelCompletionResponse(
prompt: string,
jsonNode: any,
): Promise<string | undefined> {
const chatResponse = await chatModel.complete(prompt);
const chatResponse = await chatModel.complete(
prompt,
undefined,
undefined,
promptLogger.logModelRequest,
);
if (chatResponse.success) {
const responseText = chatResponse.data;
return responseText;
Expand Down
2 changes: 1 addition & 1 deletion ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"prettier": "^3.5.3",
"shx": "^0.4.0"
},
"packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48",
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd",
"engines": {
"node": ">=20",
"pnpm": ">=10"
Expand Down
1 change: 0 additions & 1 deletion ts/packages/agents/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"@typeagent/agent-sdk": "workspace:*",
"aiclient": "workspace:*",
"knowledge-processor": "workspace:*",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1",
"typechat-utils": "workspace:*"
Expand Down
1 change: 1 addition & 0 deletions ts/packages/agents/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"better-sqlite3": "12.2.0",
"chalk": "^5.4.1",
"debug": "^4.4.0",
"telemetry": "workspace:*",
"websocket-utils": "workspace:*",
"ws": "^8.17.1"
},
Expand Down
1 change: 0 additions & 1 deletion ts/packages/agents/greeting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"chat-agent": "workspace:*",
"debug": "^4.4.0",
"knowledge-processor": "workspace:*",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1"
},
Expand Down
7 changes: 5 additions & 2 deletions ts/packages/agents/markdown/src/agent/translator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import fs from "node:fs";
import { fileURLToPath } from "node:url";
import path from "node:path";
import registerDebug from "debug";

import { MarkdownUpdateResult } from "./markdownOperationSchema.js";

const debug = registerDebug("typeagent:markdown:translator");
Expand Down Expand Up @@ -174,7 +173,11 @@ export class MarkdownAgent<T extends object> {
let accumulatedContent = "";

// Use the ChatModel's complete method with proper parameters
const response = await this.model.complete(streamingPrompt);
const response = await this.model.complete(
streamingPrompt,
undefined,
undefined,
);

// Extract content from response
let content = "";
Expand Down
1 change: 0 additions & 1 deletion ts/packages/agents/settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"chat-agent": "workspace:*",
"debug": "^4.4.0",
"knowledge-processor": "workspace:*",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1"
},
Expand Down
1 change: 0 additions & 1 deletion ts/packages/agents/video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"dependencies": {
"@typeagent/agent-sdk": "workspace:*",
"aiclient": "workspace:*",
"telemetry": "workspace:*",
"typechat-utils": "workspace:*"
},
"devDependencies": {
Expand Down
1 change: 0 additions & 1 deletion ts/packages/aiclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@azure/identity": "^4.10.0",
"async": "^3.2.5",
"debug": "^4.4.0",
"telemetry": "workspace:*",
"typechat": "^0.1.1"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions ts/packages/aiclient/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ChatModel extends TypeChatLanguageModel {
prompt: string | PromptSection[],
usageCallback?: CompleteUsageStatsCallback,
jsonSchema?: CompletionJsonSchema,
promptLogFn?: (msg: any) => void,
): Promise<Result<string>>;
}

Expand All @@ -80,6 +81,7 @@ export interface ChatModelWithStreaming extends ChatModel {
prompt: string | PromptSection[],
usageCallback?: CompleteUsageStatsCallback,
jsonSchema?: CompletionJsonSchema,
promptLogFn?: (msg: any) => void,
): Promise<Result<AsyncIterableIterator<string>>>;
}

Expand Down
11 changes: 6 additions & 5 deletions ts/packages/aiclient/src/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { readServerEventStream } from "./serverEvents.js";
import { priorityQueue } from "async";
import registerDebug from "debug";
import { TokenCounter } from "./tokenCounter.js";
import { PromptLogger } from "./promptLogger.js";
import {
createOllamaChatModel,
OllamaApiSettings,
Expand Down Expand Up @@ -485,6 +484,7 @@ function createAzureOpenAIChatModel(
prompt: string | PromptSection[],
usageCallback?: CompleteUsageStatsCallback,
jsonSchema?: CompletionJsonSchema,
logFn?: (msg: any) => void,
): Promise<Result<string>> {
verifyPromptLength(settings, prompt);

Expand Down Expand Up @@ -521,9 +521,9 @@ function createAzureOpenAIChatModel(
}

try {
if (settings.enableModelRequestLogging) {
if (settings.enableModelRequestLogging && logFn) {
// Log request
PromptLogger.getInstance().logModelRequest({
logFn({
prompt: messages as PromptSection[],
response: data.choices[0].message?.content ?? "",
tokenUsage: data.usage,
Expand Down Expand Up @@ -561,6 +561,7 @@ function createAzureOpenAIChatModel(
prompt: string | PromptSection[],
usageCallback?: CompleteUsageStatsCallback,
jsonSchema?: CompletionJsonSchema,
logFn?: (msg: any) => void,
): Promise<Result<AsyncIterableIterator<string>>> {
verifyPromptLength(settings, prompt);

Expand Down Expand Up @@ -612,9 +613,9 @@ function createAzureOpenAIChatModel(
for await (const evt of readServerEventStream(result.data)) {
if (evt.data === "[DONE]") {
try {
if (settings.enableModelRequestLogging) {
if (settings.enableModelRequestLogging && logFn) {
// Log request.
PromptLogger.getInstance().logModelRequest({
logFn({
prompt: messages as PromptSection[],
response: fullResponseText,
tokenUsageData: tokenUsage,
Expand Down
52 changes: 0 additions & 52 deletions ts/packages/aiclient/src/promptLogger.ts

This file was deleted.

1 change: 0 additions & 1 deletion ts/packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"dispatcher-node-providers": "workspace:*",
"dotenv": "^16.3.1",
"find-config": "^1.0.0",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat-utils": "workspace:*",
"ws": "^8.17.1"
Expand Down
5 changes: 2 additions & 3 deletions ts/packages/api/src/typeAgentServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
ContainerListBlobsOptions,
} from "@azure/storage-blob";
// import { DefaultAzureCredential } from "@azure/identity";
import { StopWatch } from "telemetry";
import path from "node:path";
import fs from "node:fs";
import { isDirectoryPath } from "typeagent";
Expand Down Expand Up @@ -69,10 +68,10 @@ export class TypeAgentServer {
async start() {
// restore & enable session backup?
if (this.config.blobBackupEnabled && this.storageProvider) {
const sw = new StopWatch();
//const sw = new StopWatch();
await this.syncFromProvider();
this.startLocalStorageBackup();
sw.stop("Downloaded Session Backup");
//sw.stop("Downloaded Session Backup");
}

this.webDispatcher = await createWebDispatcher();
Expand Down
1 change: 0 additions & 1 deletion ts/packages/azure-ai-foundry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"aiclient": "workspace:*",
"async": "^3.2.5",
"debug": "^4.4.0",
"telemetry": "workspace:*",
"typeagent": "workspace:*",
"typechat": "^0.1.1"
},
Expand Down
1 change: 0 additions & 1 deletion ts/packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"chalk": "^5.4.1",
"debug": "^4.4.0",
"regexp.escape": "^2.0.1",
"telemetry": "workspace:*",
"typechat": "^0.1.1",
"typechat-utils": "workspace:*"
},
Expand Down
Loading
Loading