This commit is contained in:
Dax Raad
2025-05-18 02:43:01 -04:00
parent a34d020bc6
commit d0d67029f4
11 changed files with 351 additions and 75 deletions

View File

@@ -2,12 +2,28 @@ import { App } from "./app";
import process from "node:process";
import { RPC } from "./server/server";
import { Session } from "./session/session";
import { Identifier } from "./id/id";
const app = await App.create({
directory: process.cwd(),
});
App.provide(app, async () => {
const session = await Session.create();
const sessionID = await Session.list()
[Symbol.asyncIterator]()
.next()
.then((v) => v.value ?? Session.create().then((s) => s.id));
await Session.chat(sessionID, {
role: "user",
id: Identifier.create("message"),
parts: [
{
type: "text",
text: "Hey how are you? try to use tools",
},
],
});
const rpc = RPC.listen();
});