File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ export namespace Session {
325325 providerID : z . string ( ) ,
326326 modelID : z . string ( ) ,
327327 mode : z . string ( ) . optional ( ) ,
328+ tools : z . record ( z . boolean ( ) ) . optional ( ) ,
328329 parts : z . array (
329330 z . discriminatedUnion ( "type" , [
330331 MessageV2 . TextPart . omit ( {
@@ -618,6 +619,7 @@ export namespace Session {
618619
619620 for ( const item of await Provider . tools ( input . providerID ) ) {
620621 if ( mode . tools [ item . id ] === false ) continue
622+ if ( input . tools ?. [ item . id ] === false ) continue
621623 if ( session . parentID && item . id === "task" ) continue
622624 tools [ item . id ] = tool ( {
623625 id : item . id as any ,
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ export const TaskTool = Tool.define({
4141 sessionID : session . id ,
4242 modelID : msg . modelID ,
4343 providerID : msg . providerID ,
44+ tools : {
45+ todoread : false ,
46+ todowrite : false ,
47+ } ,
4448 parts : [
4549 {
4650 id : Identifier . ascending ( "part" ) ,
Original file line number Diff line number Diff line change 11package viewport
22
33import (
4- "log/slog"
54 "math"
65 "strings"
76
You can’t perform that action at this time.
0 commit comments