summaryrefslogtreecommitdiffhomepage
path: root/js/src/index.ts
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-05-18 14:13:04 -0400
committerDax Raad <[email protected]>2025-05-26 12:40:17 -0400
commit0e303e6508edb4374213d1f98ec383b266339774 (patch)
treef7dc146eb58126f55f470ef135b66c678bf16898 /js/src/index.ts
parentbcd2fd68b7fa00af055f558049994c2975d9515d (diff)
downloadopencode-0e303e6508edb4374213d1f98ec383b266339774.tar.gz
opencode-0e303e6508edb4374213d1f98ec383b266339774.zip
sync
Diffstat (limited to 'js/src/index.ts')
-rw-r--r--js/src/index.ts22
1 files changed, 2 insertions, 20 deletions
diff --git a/js/src/index.ts b/js/src/index.ts
index 72c32c8e9..8f98310be 100644
--- a/js/src/index.ts
+++ b/js/src/index.ts
@@ -1,29 +1,11 @@
import { App } from "./app";
import process from "node:process";
-import { RPC } from "./server/server";
-import { Session } from "./session/session";
-import { Identifier } from "./id/id";
+import { Server } from "./server/server";
const app = await App.create({
directory: process.cwd(),
});
App.provide(app, async () => {
- 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.ascending("message"),
- parts: [
- {
- type: "text",
- text: "Hey how are you? try to use tools",
- },
- ],
- });
-
- const rpc = RPC.listen();
+ const server = Server.listen();
});