feat(id): brand SessionID through Drizzle and Zod schemas (#16953)
This commit is contained in:
parent
4e73473119
commit
cb67465675
44 changed files with 226 additions and 158 deletions
|
|
@ -2,6 +2,7 @@ import { Tool } from "./tool"
|
|||
import DESCRIPTION from "./task.txt"
|
||||
import z from "zod"
|
||||
import { Session } from "../session"
|
||||
import { SessionID } from "../session/schema"
|
||||
import { MessageV2 } from "../session/message-v2"
|
||||
import { Identifier } from "../id/id"
|
||||
import { Agent } from "../agent/agent"
|
||||
|
|
@ -65,7 +66,7 @@ export const TaskTool = Tool.define("task", async (ctx) => {
|
|||
|
||||
const session = await iife(async () => {
|
||||
if (params.task_id) {
|
||||
const found = await Session.get(params.task_id).catch(() => {})
|
||||
const found = await Session.get(SessionID.make(params.task_id)).catch(() => {})
|
||||
if (found) return found
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue