diff options
| author | bobzel <zzzman@gmail.com> | 2025-05-05 12:37:09 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-05-05 12:37:09 -0400 |
| commit | 3a733aa0fd24517e83649824dec0fc8bcc0bde43 (patch) | |
| tree | ac01848cdab3b83582c0b7ab6f3d2b1c8187a24f /src/client/views/nodes/chatbot/tools | |
| parent | e058d227ccbce47c86b0fa558adb01dfccaf4d60 (diff) | |
| parent | d4659e2bd3ddb947683948083232c26fb1227f39 (diff) | |
Merge branch 'master' into joanne-tutorialagent
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}` }]; |
