diff options
| author | bobzel <zzzman@gmail.com> | 2025-04-30 14:43:29 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-04-30 14:43:29 -0400 |
| commit | 0317a667a5d4a0f298522eeddb8afa96e7b7ecfc (patch) | |
| tree | 2d66c3caa5c102a3ca78837b87e61c16fd07fc01 /src/client/views/nodes/chatbot/tools | |
| parent | 9ec7df6af508eccdfda3a195a69c8bb1f86c41ea (diff) | |
| parent | 2296c314be710f983d595de37c9d8039d73568a6 (diff) | |
Merge branch 'master' into task_nodes_aarav
Diffstat (limited to 'src/client/views/nodes/chatbot/tools')
| -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}` }]; |
