carlyemail-toolkit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +3 -1
- package/package.json +1 -1
- package/tools.js +1 -1
package/core.js
CHANGED
|
@@ -245,7 +245,9 @@ async function updateMessage(client, a) {
|
|
|
245
245
|
|
|
246
246
|
async function getAttachment(client, a) {
|
|
247
247
|
const inbox = await oneInbox(client, a.inbox_id);
|
|
248
|
-
|
|
248
|
+
// A draft's id where a message's is asked for, as the hosted tool takes it.
|
|
249
|
+
const owner = String(a.message_id).startsWith("draft_") ? client.drafts : client.messages;
|
|
250
|
+
return owner.getAttachment(inbox, a.message_id, a.attachment_id);
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
async function createDraft(client, a) {
|
package/package.json
CHANGED
package/tools.js
CHANGED
|
@@ -402,7 +402,7 @@ export default {
|
|
|
402
402
|
{
|
|
403
403
|
"name": "get_attachment",
|
|
404
404
|
"title": "Read an attachment",
|
|
405
|
-
"description": "Read an attachment. Returns a download URL and extracted text for PDF and DOCX files. Use extracted_text to read the document; check text_status, text_truncated and text_warning for limits. Scanned images are not transcribed (no OCR).",
|
|
405
|
+
"description": "Read an attachment. Returns a download URL and extracted text for PDF and DOCX files. Use extracted_text to read the document; check text_status, text_truncated and text_warning for limits. Scanned images are not transcribed (no OCR). To read a file on a draft, pass its draft_id as message_id.",
|
|
406
406
|
"input_schema": {
|
|
407
407
|
"type": "object",
|
|
408
408
|
"properties": {
|