fix(deep-research): parent nodes are accidently triggered twice ingenerating_query
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import { streamText } from 'ai'
|
import { streamText } from 'ai'
|
||||||
import pLimit from 'p-limit'
|
|
||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import { parseStreamingJson, type DeepPartial } from '~/utils/json'
|
import { parseStreamingJson, type DeepPartial } from '~/utils/json'
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ export interface WriteFinalReportParams {
|
|||||||
learnings: string[]
|
learnings: string[]
|
||||||
language: string
|
language: string
|
||||||
}
|
}
|
||||||
// useRuntimeConfig()
|
|
||||||
// Used for streaming response
|
// Used for streaming response
|
||||||
export type SearchQuery = z.infer<typeof searchQueriesTypeSchema>['queries'][0]
|
export type SearchQuery = z.infer<typeof searchQueriesTypeSchema>['queries'][0]
|
||||||
export type PartialSearchQuery = DeepPartial<SearchQuery>
|
export type PartialSearchQuery = DeepPartial<SearchQuery>
|
||||||
@ -243,12 +242,6 @@ export async function deepResearch({
|
|||||||
const language = t('language', {}, { locale: languageCode })
|
const language = t('language', {}, { locale: languageCode })
|
||||||
const globalLimit = usePLimit()
|
const globalLimit = usePLimit()
|
||||||
|
|
||||||
onProgress({
|
|
||||||
type: 'generating_query',
|
|
||||||
nodeId,
|
|
||||||
result: {},
|
|
||||||
})
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const searchQueriesResult = generateSearchQueries({
|
const searchQueriesResult = generateSearchQueries({
|
||||||
query,
|
query,
|
||||||
|
Reference in New Issue
Block a user