@mulmochat-plugin/summarize-pdf 0.2.0 → 0.2.1
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/dist/core.cjs +1 -1
- package/dist/core.js +7 -4
- package/package.json +3 -3
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i="summarizePDF",n={type:"function",name:i,description:"Summarize the content of a currently selected PDF file using Claude.",parameters:{type:"object",properties:{prompt:{type:"string",description:"Instructions for Claude on how to summarize or analyze the PDF"}},required:["prompt"]}};function o(e,a){return{toolName:i,data:{pdfData:e,fileName:a},message:"",title:a}}const u=async(e,a)=>{const{prompt:l}=a,r=e.currentResult?.data;if(!r?.pdfData)return{message:"No PDF file available to summarize. Please select a PDF file first.",instructions:"Tell the user that no PDF file is currently selected and they need to upload a PDF file first."};if(!e.app?.summarizePdf)return{message:"summarizePdf function not available",instructions:"Tell the user that the PDF summarization failed."};try{const t=(await e.app.summarizePdf({prompt:l,pdfData:r.pdfData})).summary||"";return{data:{...r,summary:t},jsonData:{fileName:r.fileName,summary:t},message:"PDF summarized successfully",instructions:"Give the user a brief summary of the PDF.",instructionsRequired:!0,updating:!0}}catch(s){console.error("PDF summarization failed",s);const t=s instanceof Error?s.message:"Unknown error";return{message:`PDF summarization failed: ${t}`,instructions:`Tell the user that the PDF summarization failed with error: ${t}`}}},m={toolDefinition:n,execute:u,generatingMessage:"Summarizing PDF...",uploadMessage:"PDF file is available. Call 'summarizePDF' to see its summary",isEnabled:e=>!!e?.hasAnthropicApiKey,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i="summarizePDF",n={type:"function",name:i,description:"Summarize the content of a currently selected PDF file using Claude.",parameters:{type:"object",properties:{prompt:{type:"string",description:"Instructions for Claude on how to summarize or analyze the PDF"}},required:["prompt"]}};function o(e,a){return{toolName:i,data:{pdfData:e,fileName:a},message:"",title:a}}const u=async(e,a)=>{const{prompt:l}=a,r=e.currentResult?.data;if(!r?.pdfData)return{message:"No PDF file available to summarize. Please select a PDF file first.",instructions:"Tell the user that no PDF file is currently selected and they need to upload a PDF file first."};if(!e.app?.summarizePdf)return{message:"summarizePdf function not available",instructions:"Tell the user that the PDF summarization failed."};try{const t=(await e.app.summarizePdf({prompt:l,pdfData:r.pdfData})).summary||"";return{data:{...r,summary:t},jsonData:{fileName:r.fileName,summary:t},message:"PDF summarized successfully",instructions:"Give the user a brief summary of the PDF.",instructionsRequired:!0,updating:!0}}catch(s){console.error("PDF summarization failed",s);const t=s instanceof Error?s.message:"Unknown error";return{message:`PDF summarization failed: ${t}`,instructions:`Tell the user that the PDF summarization failed with error: ${t}`}}},m={toolDefinition:n,execute:u,generatingMessage:"Summarizing PDF...",uploadMessage:"PDF file is available. Call 'summarizePDF' to see its summary",isEnabled:e=>!!e?.hasAnthropicApiKey,inputHandlers:[{type:"file",acceptedTypes:["application/pdf"],handleInput:o}]};exports.TOOL_DEFINITION=n;exports.TOOL_NAME=i;exports.createUploadedPdfResult=o;exports.executeSummarizePdf=u;exports.pluginCore=m;
|
package/dist/core.js
CHANGED
|
@@ -66,10 +66,13 @@ const l = async (e, a) => {
|
|
|
66
66
|
generatingMessage: "Summarizing PDF...",
|
|
67
67
|
uploadMessage: "PDF file is available. Call 'summarizePDF' to see its summary",
|
|
68
68
|
isEnabled: (e) => !!e?.hasAnthropicApiKey,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
inputHandlers: [
|
|
70
|
+
{
|
|
71
|
+
type: "file",
|
|
72
|
+
acceptedTypes: ["application/pdf"],
|
|
73
|
+
handleInput: u
|
|
74
|
+
}
|
|
75
|
+
]
|
|
73
76
|
};
|
|
74
77
|
export {
|
|
75
78
|
o as TOOL_DEFINITION,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulmochat-plugin/summarize-pdf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "PDF summarization plugin for MulmoChat",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"vue": "^3.5.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"marked": "^12.0.0",
|
|
41
40
|
"@tailwindcss/vite": "^4.1.18",
|
|
42
41
|
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
43
42
|
"@typescript-eslint/parser": "^8.53.0",
|
|
44
43
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
45
44
|
"eslint": "^9.39.2",
|
|
46
|
-
"eslint-plugin-vue": "^10.
|
|
45
|
+
"eslint-plugin-vue": "^10.7.0",
|
|
47
46
|
"globals": "^17.0.0",
|
|
47
|
+
"marked": "^17.0.1",
|
|
48
48
|
"tailwindcss": "^4.1.18",
|
|
49
49
|
"typescript": "~5.9.3",
|
|
50
50
|
"vite": "^7.3.1",
|