ToolUseContext constructor

ToolUseContext({
  1. required List<ToolDefinition> tools,
  2. required String mainLoopModel,
  3. List mcpClients = const [],
  4. bool isNonInteractiveSession = false,
  5. String? querySource,
  6. String? agentId,
  7. bool requireCanUseTool = false,
  8. required AbortController abortController,
  9. void setInProgressToolUseIDs(
    1. Set<String> updater(
      1. Set<String>
      )
    )?,
  10. void setHasInterruptibleToolInProgress(
    1. bool
    )?,
  11. void setStreamMode(
    1. String
    )?,
  12. void setResponseLength(
    1. int (
      1. int
      )
    )?,
  13. void setSDKStatus(
    1. String?
    )?,
  14. void addNotification(
    1. Map<String, dynamic>
    )?,
  15. Future<Map<String, dynamic>> getAppState()?,
  16. Map<String, ({String content, int timestamp})>? readFileState,
  17. Set<String>? loadedNestedMemoryPaths,
  18. QueryTracking? queryTracking,
  19. String? requestPrompt,
})

Implementation

ToolUseContext({
  required this.tools,
  required this.mainLoopModel,
  this.mcpClients = const [],
  this.isNonInteractiveSession = false,
  this.querySource,
  this.agentId,
  this.requireCanUseTool = false,
  required this.abortController,
  this.setInProgressToolUseIDs,
  this.setHasInterruptibleToolInProgress,
  this.setStreamMode,
  this.setResponseLength,
  this.setSDKStatus,
  this.addNotification,
  this.getAppState,
  Map<String, ({String content, int timestamp})>? readFileState,
  this.loadedNestedMemoryPaths,
  this.queryTracking,
  this.requestPrompt,
}) : readFileState = readFileState ?? {};