diff options
| author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-05-30 03:30:12 -0400 |
|---|---|---|
| committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-05-30 03:30:12 -0400 |
| commit | 29e5bbe68e02fe1d86e960a634d0580c37612254 (patch) | |
| tree | e88585946a58feb988e3a3bb45dd2a9a09fea4c3 /src/client/views/nodes/chatbot/tools/GetDocsTool.ts | |
| parent | f92a02ec5d676359cb268a35d30e5bf9886199c1 (diff) | |
| parent | 49fb76f1c54fb8fc4e76bdcf675719d41bfc36aa (diff) | |
Merge branch 'master' into Template-Changes
Diffstat (limited to 'src/client/views/nodes/chatbot/tools/GetDocsTool.ts')
| -rw-r--r-- | src/client/views/nodes/chatbot/tools/GetDocsTool.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/chatbot/tools/GetDocsTool.ts b/src/client/views/nodes/chatbot/tools/GetDocsTool.ts index 05482a66e..42a7747d3 100644 --- a/src/client/views/nodes/chatbot/tools/GetDocsTool.ts +++ b/src/client/views/nodes/chatbot/tools/GetDocsTool.ts @@ -40,7 +40,10 @@ export class GetDocsTool extends BaseTool<GetDocsToolParamsType> { } async execute(args: ParametersType<GetDocsToolParamsType>): Promise<Observation[]> { - const docs = args.document_ids.map(doc_id => DocCast(DocServer.GetCachedRefField(doc_id))); + const docs = args.document_ids + .map(doc_id => DocCast(DocServer.GetCachedRefField(doc_id))) + .filter(d => d) + .map(d => d!); const collection = Docs.Create.FreeformDocument(docs, { title: args.title }); this._docView._props.addDocTab(collection, OpenWhere.addRight); return [{ type: 'text', text: `Collection created in Dash called ${args.title}` }]; |
