MCPcopy
hub / github.com/codeaashu/claude-code / queryModelWithStreaming

Function queryModelWithStreaming

src/services/api/claude.ts:752–780  ·  view source on GitHub ↗
({
  messages,
  systemPrompt,
  thinkingConfig,
  tools,
  signal,
  options,
}: {
  messages: Message[]
  systemPrompt: SystemPrompt
  thinkingConfig: ThinkingConfig
  tools: Tools
  signal: AbortSignal
  options: Options
})

Source from the content-addressed store, hash-verified

750}
751
752export async function* queryModelWithStreaming({
753 messages,
754 systemPrompt,
755 thinkingConfig,
756 tools,
757 signal,
758 options,
759}: {
760 messages: Message[]
761 systemPrompt: SystemPrompt
762 thinkingConfig: ThinkingConfig
763 tools: Tools
764 signal: AbortSignal
765 options: Options
766}): AsyncGenerator<
767 StreamEvent | AssistantMessage | SystemAPIErrorMessage,
768 void
769> {
770 return yield* withStreamingVCR(messages, async function* () {
771 yield* queryModel(
772 messages,
773 systemPrompt,
774 thinkingConfig,
775 tools,
776 signal,
777 options,
778 )
779 })
780}
781
782/**
783 * Determines if an LSP tool should be deferred (tool appears with defer_loading: true)

Callers 2

callFunction · 0.85
streamCompactSummaryFunction · 0.85

Calls 2

withStreamingVCRFunction · 0.85
queryModelFunction · 0.85

Tested by

no test coverage detected