local-cli-agent 5.0.4 → 5.0.6
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/agents/browser/browser-sub-agent.d.ts.map +1 -1
- package/dist/agents/browser/browser-sub-agent.js +3 -0
- package/dist/agents/browser/browser-sub-agent.js.map +1 -1
- package/dist/constants.d.ts +1 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/core/llm/llm-client.d.ts +1 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -1
- package/dist/core/llm/llm-client.js +17 -4
- package/dist/core/llm/llm-client.js.map +1 -1
- package/dist/core/llm/providers.d.ts +12 -0
- package/dist/core/llm/providers.d.ts.map +1 -0
- package/dist/core/llm/providers.js +80 -0
- package/dist/core/llm/providers.js.map +1 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -1
- package/dist/prompts/system/plan-execute.js +40 -4
- package/dist/prompts/system/plan-execute.js.map +1 -1
- package/dist/tools/browser/browser-client.d.ts +13 -1
- package/dist/tools/browser/browser-client.d.ts.map +1 -1
- package/dist/tools/browser/browser-client.js +137 -9
- package/dist/tools/browser/browser-client.js.map +1 -1
- package/dist/tools/browser/browser-tools.d.ts +8 -2
- package/dist/tools/browser/browser-tools.d.ts.map +1 -1
- package/dist/tools/browser/browser-tools.js +428 -49
- package/dist/tools/browser/browser-tools.js.map +1 -1
- package/dist/tools/browser/index.d.ts +1 -1
- package/dist/tools/browser/index.d.ts.map +1 -1
- package/dist/tools/browser/index.js +1 -1
- package/dist/tools/browser/index.js.map +1 -1
- package/dist/tools/llm/simple/planning-tools.d.ts +1 -0
- package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -1
- package/dist/tools/llm/simple/planning-tools.js +80 -26
- package/dist/tools/llm/simple/planning-tools.js.map +1 -1
- package/dist/tools/llm/simple/read-image-tool.d.ts.map +1 -1
- package/dist/tools/llm/simple/read-image-tool.js +0 -2
- package/dist/tools/llm/simple/read-image-tool.js.map +1 -1
- package/dist/tools/office/excel-tools/advanced.d.ts +13 -0
- package/dist/tools/office/excel-tools/advanced.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/advanced.js +364 -0
- package/dist/tools/office/excel-tools/advanced.js.map +1 -0
- package/dist/tools/office/excel-tools/cells.js +1 -1
- package/dist/tools/office/excel-tools/cells.js.map +1 -1
- package/dist/tools/office/excel-tools/charts.d.ts +6 -0
- package/dist/tools/office/excel-tools/charts.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/charts.js +250 -1
- package/dist/tools/office/excel-tools/charts.js.map +1 -1
- package/dist/tools/office/excel-tools/comments.d.ts +1 -0
- package/dist/tools/office/excel-tools/comments.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/comments.js +36 -0
- package/dist/tools/office/excel-tools/comments.js.map +1 -1
- package/dist/tools/office/excel-tools/data-ops.d.ts +4 -0
- package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/data-ops.js +155 -1
- package/dist/tools/office/excel-tools/data-ops.js.map +1 -1
- package/dist/tools/office/excel-tools/export.d.ts +3 -0
- package/dist/tools/office/excel-tools/export.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/export.js +117 -1
- package/dist/tools/office/excel-tools/export.js.map +1 -1
- package/dist/tools/office/excel-tools/formatting.d.ts +2 -0
- package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/formatting.js +74 -0
- package/dist/tools/office/excel-tools/formatting.js.map +1 -1
- package/dist/tools/office/excel-tools/formulas.d.ts +11 -0
- package/dist/tools/office/excel-tools/formulas.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/formulas.js +313 -0
- package/dist/tools/office/excel-tools/formulas.js.map +1 -0
- package/dist/tools/office/excel-tools/index.d.ts +5 -0
- package/dist/tools/office/excel-tools/index.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/index.js +15 -0
- package/dist/tools/office/excel-tools/index.js.map +1 -1
- package/dist/tools/office/excel-tools/launch.d.ts +0 -1
- package/dist/tools/office/excel-tools/launch.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/launch.js +33 -36
- package/dist/tools/office/excel-tools/launch.js.map +1 -1
- package/dist/tools/office/excel-tools/media.d.ts +5 -0
- package/dist/tools/office/excel-tools/media.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/media.js +176 -0
- package/dist/tools/office/excel-tools/media.js.map +1 -1
- package/dist/tools/office/excel-tools/page-setup.d.ts +6 -0
- package/dist/tools/office/excel-tools/page-setup.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/page-setup.js +144 -0
- package/dist/tools/office/excel-tools/page-setup.js.map +1 -0
- package/dist/tools/office/excel-tools/pivot-table.d.ts +7 -0
- package/dist/tools/office/excel-tools/pivot-table.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/pivot-table.js +151 -0
- package/dist/tools/office/excel-tools/pivot-table.js.map +1 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts +4 -0
- package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/rows-columns.js +149 -2
- package/dist/tools/office/excel-tools/rows-columns.js.map +1 -1
- package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/sheets.js +288 -0
- package/dist/tools/office/excel-tools/sheets.js.map +1 -1
- package/dist/tools/office/excel-tools/tables.d.ts +7 -0
- package/dist/tools/office/excel-tools/tables.d.ts.map +1 -0
- package/dist/tools/office/excel-tools/tables.js +156 -0
- package/dist/tools/office/excel-tools/tables.js.map +1 -0
- package/dist/tools/office/index.d.ts +3 -3
- package/dist/tools/office/index.d.ts.map +1 -1
- package/dist/tools/office/index.js +3 -3
- package/dist/tools/office/index.js.map +1 -1
- package/dist/tools/office/powerpoint-client.d.ts +20 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-client.js +223 -0
- package/dist/tools/office/powerpoint-client.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/effects.js +55 -42
- package/dist/tools/office/powerpoint-tools/effects.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/export.d.ts +1 -0
- package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/export.js +44 -1
- package/dist/tools/office/powerpoint-tools/export.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/launch.d.ts +0 -1
- package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/launch.js +28 -36
- package/dist/tools/office/powerpoint-tools/launch.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/media.js +25 -15
- package/dist/tools/office/powerpoint-tools/media.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/notes.js +20 -10
- package/dist/tools/office/powerpoint-tools/notes.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/sections.js +13 -6
- package/dist/tools/office/powerpoint-tools/sections.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/shapes.d.ts +2 -0
- package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/shapes.js +181 -45
- package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/slides.d.ts +4 -0
- package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/slides.js +179 -15
- package/dist/tools/office/powerpoint-tools/slides.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
- package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/tables.js +239 -9
- package/dist/tools/office/powerpoint-tools/tables.js.map +1 -1
- package/dist/tools/office/powerpoint-tools/text.d.ts +1 -0
- package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-tools/text.js +96 -34
- package/dist/tools/office/powerpoint-tools/text.js.map +1 -1
- package/dist/tools/office/word-tools/find.d.ts +5 -0
- package/dist/tools/office/word-tools/find.d.ts.map +1 -0
- package/dist/tools/office/word-tools/find.js +106 -0
- package/dist/tools/office/word-tools/find.js.map +1 -0
- package/dist/tools/office/word-tools/footnotes.d.ts +9 -0
- package/dist/tools/office/word-tools/footnotes.d.ts.map +1 -0
- package/dist/tools/office/word-tools/footnotes.js +227 -0
- package/dist/tools/office/word-tools/footnotes.js.map +1 -0
- package/dist/tools/office/word-tools/index.d.ts +6 -0
- package/dist/tools/office/word-tools/index.d.ts.map +1 -1
- package/dist/tools/office/word-tools/index.js +18 -0
- package/dist/tools/office/word-tools/index.js.map +1 -1
- package/dist/tools/office/word-tools/launch.d.ts +0 -1
- package/dist/tools/office/word-tools/launch.d.ts.map +1 -1
- package/dist/tools/office/word-tools/launch.js +33 -36
- package/dist/tools/office/word-tools/launch.js.map +1 -1
- package/dist/tools/office/word-tools/selection.d.ts +8 -0
- package/dist/tools/office/word-tools/selection.d.ts.map +1 -0
- package/dist/tools/office/word-tools/selection.js +193 -0
- package/dist/tools/office/word-tools/selection.js.map +1 -0
- package/dist/tools/office/word-tools/tables-advanced.d.ts +8 -0
- package/dist/tools/office/word-tools/tables-advanced.d.ts.map +1 -0
- package/dist/tools/office/word-tools/tables-advanced.js +190 -0
- package/dist/tools/office/word-tools/tables-advanced.js.map +1 -0
- package/dist/tools/office/word-tools/toc.d.ts +6 -0
- package/dist/tools/office/word-tools/toc.d.ts.map +1 -0
- package/dist/tools/office/word-tools/toc.js +114 -0
- package/dist/tools/office/word-tools/toc.js.map +1 -0
- package/dist/tools/office/word-tools/track-changes.d.ts +8 -0
- package/dist/tools/office/word-tools/track-changes.d.ts.map +1 -0
- package/dist/tools/office/word-tools/track-changes.js +195 -0
- package/dist/tools/office/word-tools/track-changes.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/components/Logo.d.ts.map +1 -1
- package/dist/ui/components/Logo.js +2 -4
- package/dist/ui/components/Logo.js.map +1 -1
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -1
- package/dist/ui/components/PlanExecuteApp.js +3 -5
- package/dist/ui/components/PlanExecuteApp.js.map +1 -1
- package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -1
- package/dist/ui/components/dialogs/SettingsDialog.js +50 -5
- package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { wordClient } from '../word-client.js';
|
|
2
|
+
import { OFFICE_CATEGORIES } from '../common/constants.js';
|
|
3
|
+
const WORD_ADD_FOOTNOTE_DEFINITION = {
|
|
4
|
+
type: 'function',
|
|
5
|
+
function: {
|
|
6
|
+
name: 'word_add_footnote',
|
|
7
|
+
description: `Add a footnote at the current cursor position.
|
|
8
|
+
Footnotes appear at the bottom of the page.
|
|
9
|
+
A superscript number is automatically inserted at the cursor position.`,
|
|
10
|
+
parameters: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
reason: { type: 'string', description: 'Why you are adding a footnote' },
|
|
14
|
+
text: { type: 'string', description: 'Footnote text' },
|
|
15
|
+
},
|
|
16
|
+
required: ['reason', 'text'],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
async function executeWordAddFootnote(args) {
|
|
21
|
+
try {
|
|
22
|
+
const response = await wordClient.wordAddFootnote(args['text']);
|
|
23
|
+
if (response.success) {
|
|
24
|
+
return { success: true, result: `Footnote ${response['index']} added` };
|
|
25
|
+
}
|
|
26
|
+
return { success: false, error: response.error || 'Failed to add footnote' };
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return { success: false, error: `Failed to add footnote: ${error instanceof Error ? error.message : String(error)}` };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export const wordAddFootnoteTool = {
|
|
33
|
+
definition: WORD_ADD_FOOTNOTE_DEFINITION,
|
|
34
|
+
execute: executeWordAddFootnote,
|
|
35
|
+
categories: OFFICE_CATEGORIES,
|
|
36
|
+
description: 'Add Word footnote',
|
|
37
|
+
};
|
|
38
|
+
const WORD_ADD_ENDNOTE_DEFINITION = {
|
|
39
|
+
type: 'function',
|
|
40
|
+
function: {
|
|
41
|
+
name: 'word_add_endnote',
|
|
42
|
+
description: `Add an endnote at the current cursor position.
|
|
43
|
+
Endnotes appear at the end of the document.
|
|
44
|
+
A superscript number is automatically inserted at the cursor position.`,
|
|
45
|
+
parameters: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
reason: { type: 'string', description: 'Why you are adding an endnote' },
|
|
49
|
+
text: { type: 'string', description: 'Endnote text' },
|
|
50
|
+
},
|
|
51
|
+
required: ['reason', 'text'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
async function executeWordAddEndnote(args) {
|
|
56
|
+
try {
|
|
57
|
+
const response = await wordClient.wordAddEndnote(args['text']);
|
|
58
|
+
if (response.success) {
|
|
59
|
+
return { success: true, result: `Endnote ${response['index']} added` };
|
|
60
|
+
}
|
|
61
|
+
return { success: false, error: response.error || 'Failed to add endnote' };
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
return { success: false, error: `Failed to add endnote: ${error instanceof Error ? error.message : String(error)}` };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export const wordAddEndnoteTool = {
|
|
68
|
+
definition: WORD_ADD_ENDNOTE_DEFINITION,
|
|
69
|
+
execute: executeWordAddEndnote,
|
|
70
|
+
categories: OFFICE_CATEGORIES,
|
|
71
|
+
description: 'Add Word endnote',
|
|
72
|
+
};
|
|
73
|
+
const WORD_GET_FOOTNOTES_DEFINITION = {
|
|
74
|
+
type: 'function',
|
|
75
|
+
function: {
|
|
76
|
+
name: 'word_get_footnotes',
|
|
77
|
+
description: `Get all footnotes in the document.
|
|
78
|
+
Returns: index, text, and reference text for each footnote.`,
|
|
79
|
+
parameters: {
|
|
80
|
+
type: 'object',
|
|
81
|
+
properties: {
|
|
82
|
+
reason: { type: 'string', description: 'Why you need footnotes' },
|
|
83
|
+
},
|
|
84
|
+
required: ['reason'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
async function executeWordGetFootnotes(_args) {
|
|
89
|
+
try {
|
|
90
|
+
const response = await wordClient.wordGetFootnotes();
|
|
91
|
+
if (response.success) {
|
|
92
|
+
const footnotes = response['footnotes'] || [];
|
|
93
|
+
const count = response['count'] || 0;
|
|
94
|
+
if (count === 0) {
|
|
95
|
+
return { success: true, result: 'No footnotes found' };
|
|
96
|
+
}
|
|
97
|
+
const list = footnotes.map(fn => `[${fn.index}] "${fn.text}" (ref: "${fn.reference_text?.slice(0, 30)}...")`).join('\n');
|
|
98
|
+
return { success: true, result: `${count} footnote(s):\n${list}` };
|
|
99
|
+
}
|
|
100
|
+
return { success: false, error: response.error || 'Failed to get footnotes' };
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
return { success: false, error: `Failed to get footnotes: ${error instanceof Error ? error.message : String(error)}` };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export const wordGetFootnotesTool = {
|
|
107
|
+
definition: WORD_GET_FOOTNOTES_DEFINITION,
|
|
108
|
+
execute: executeWordGetFootnotes,
|
|
109
|
+
categories: OFFICE_CATEGORIES,
|
|
110
|
+
description: 'Get Word footnotes',
|
|
111
|
+
};
|
|
112
|
+
const WORD_GET_ENDNOTES_DEFINITION = {
|
|
113
|
+
type: 'function',
|
|
114
|
+
function: {
|
|
115
|
+
name: 'word_get_endnotes',
|
|
116
|
+
description: `Get all endnotes in the document.
|
|
117
|
+
Returns: index, text, and reference text for each endnote.`,
|
|
118
|
+
parameters: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
properties: {
|
|
121
|
+
reason: { type: 'string', description: 'Why you need endnotes' },
|
|
122
|
+
},
|
|
123
|
+
required: ['reason'],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
async function executeWordGetEndnotes(_args) {
|
|
128
|
+
try {
|
|
129
|
+
const response = await wordClient.wordGetEndnotes();
|
|
130
|
+
if (response.success) {
|
|
131
|
+
const endnotes = response['endnotes'] || [];
|
|
132
|
+
const count = response['count'] || 0;
|
|
133
|
+
if (count === 0) {
|
|
134
|
+
return { success: true, result: 'No endnotes found' };
|
|
135
|
+
}
|
|
136
|
+
const list = endnotes.map(en => `[${en.index}] "${en.text}" (ref: "${en.reference_text?.slice(0, 30)}...")`).join('\n');
|
|
137
|
+
return { success: true, result: `${count} endnote(s):\n${list}` };
|
|
138
|
+
}
|
|
139
|
+
return { success: false, error: response.error || 'Failed to get endnotes' };
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
return { success: false, error: `Failed to get endnotes: ${error instanceof Error ? error.message : String(error)}` };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export const wordGetEndnotesTool = {
|
|
146
|
+
definition: WORD_GET_ENDNOTES_DEFINITION,
|
|
147
|
+
execute: executeWordGetEndnotes,
|
|
148
|
+
categories: OFFICE_CATEGORIES,
|
|
149
|
+
description: 'Get Word endnotes',
|
|
150
|
+
};
|
|
151
|
+
const WORD_DELETE_FOOTNOTE_DEFINITION = {
|
|
152
|
+
type: 'function',
|
|
153
|
+
function: {
|
|
154
|
+
name: 'word_delete_footnote',
|
|
155
|
+
description: `Delete a footnote by index.
|
|
156
|
+
Use word_get_footnotes first to see available indices.`,
|
|
157
|
+
parameters: {
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
reason: { type: 'string', description: 'Why you are deleting this footnote' },
|
|
161
|
+
index: { type: 'number', description: 'Footnote index (1-based)' },
|
|
162
|
+
},
|
|
163
|
+
required: ['reason', 'index'],
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
async function executeWordDeleteFootnote(args) {
|
|
168
|
+
try {
|
|
169
|
+
const response = await wordClient.wordDeleteFootnote(args['index']);
|
|
170
|
+
if (response.success) {
|
|
171
|
+
return { success: true, result: response.message || 'Footnote deleted' };
|
|
172
|
+
}
|
|
173
|
+
return { success: false, error: response.error || 'Failed to delete footnote' };
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
return { success: false, error: `Failed to delete footnote: ${error instanceof Error ? error.message : String(error)}` };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
export const wordDeleteFootnoteTool = {
|
|
180
|
+
definition: WORD_DELETE_FOOTNOTE_DEFINITION,
|
|
181
|
+
execute: executeWordDeleteFootnote,
|
|
182
|
+
categories: OFFICE_CATEGORIES,
|
|
183
|
+
description: 'Delete Word footnote',
|
|
184
|
+
};
|
|
185
|
+
const WORD_DELETE_ENDNOTE_DEFINITION = {
|
|
186
|
+
type: 'function',
|
|
187
|
+
function: {
|
|
188
|
+
name: 'word_delete_endnote',
|
|
189
|
+
description: `Delete an endnote by index.
|
|
190
|
+
Use word_get_endnotes first to see available indices.`,
|
|
191
|
+
parameters: {
|
|
192
|
+
type: 'object',
|
|
193
|
+
properties: {
|
|
194
|
+
reason: { type: 'string', description: 'Why you are deleting this endnote' },
|
|
195
|
+
index: { type: 'number', description: 'Endnote index (1-based)' },
|
|
196
|
+
},
|
|
197
|
+
required: ['reason', 'index'],
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
async function executeWordDeleteEndnote(args) {
|
|
202
|
+
try {
|
|
203
|
+
const response = await wordClient.wordDeleteEndnote(args['index']);
|
|
204
|
+
if (response.success) {
|
|
205
|
+
return { success: true, result: response.message || 'Endnote deleted' };
|
|
206
|
+
}
|
|
207
|
+
return { success: false, error: response.error || 'Failed to delete endnote' };
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
return { success: false, error: `Failed to delete endnote: ${error instanceof Error ? error.message : String(error)}` };
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
export const wordDeleteEndnoteTool = {
|
|
214
|
+
definition: WORD_DELETE_ENDNOTE_DEFINITION,
|
|
215
|
+
execute: executeWordDeleteEndnote,
|
|
216
|
+
categories: OFFICE_CATEGORIES,
|
|
217
|
+
description: 'Delete Word endnote',
|
|
218
|
+
};
|
|
219
|
+
export const footnotesTools = [
|
|
220
|
+
wordAddFootnoteTool,
|
|
221
|
+
wordAddEndnoteTool,
|
|
222
|
+
wordGetFootnotesTool,
|
|
223
|
+
wordGetEndnotesTool,
|
|
224
|
+
wordDeleteFootnoteTool,
|
|
225
|
+
wordDeleteEndnoteTool,
|
|
226
|
+
];
|
|
227
|
+
//# sourceMappingURL=footnotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/footnotes.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,MAAM,4BAA4B,GAAmB;IACnD,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE;;uEAEsD;QACnE,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+BAA+B,EAAE;gBACxE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE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OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;IAC1H,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAkB;IAClD,UAAU,EAAE,8BAA8B;IAC1C,OAAO,EAAE,wBAAwB;IACjC,UAAU,EAAE,iBAAiB;IAC7B,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAMF,MAAM,CAAC,MAAM,cAAc,GAAoB;IAC7C,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,sBAAsB;IACtB,qBAAqB;CACtB,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from './launch.js';
|
|
|
3
3
|
export * from './text.js';
|
|
4
4
|
export * from './formatting.js';
|
|
5
5
|
export * from './tables.js';
|
|
6
|
+
export * from './tables-advanced.js';
|
|
6
7
|
export * from './content.js';
|
|
7
8
|
export * from './lists.js';
|
|
8
9
|
export * from './headers-footers.js';
|
|
@@ -13,6 +14,11 @@ export * from './watermarks.js';
|
|
|
13
14
|
export * from './navigation.js';
|
|
14
15
|
export * from './undo-redo.js';
|
|
15
16
|
export * from './export.js';
|
|
17
|
+
export * from './selection.js';
|
|
18
|
+
export * from './track-changes.js';
|
|
19
|
+
export * from './toc.js';
|
|
20
|
+
export * from './footnotes.js';
|
|
21
|
+
export * from './find.js';
|
|
16
22
|
import type { LLMSimpleTool } from '../../types.js';
|
|
17
23
|
export declare const WORD_TOOLS: LLMSimpleTool[];
|
|
18
24
|
export declare const WORD_CREATE_TOOLS: LLMSimpleTool[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/index.ts"],"names":[],"mappings":"AAQA,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAoDpD,eAAO,MAAM,UAAU,iBAqBtB,CAAC;AAMF,eAAO,MAAM,iBAAiB,EAAE,aAAa,EAS5C,CAAC"}
|
|
@@ -3,6 +3,7 @@ export * from './launch.js';
|
|
|
3
3
|
export * from './text.js';
|
|
4
4
|
export * from './formatting.js';
|
|
5
5
|
export * from './tables.js';
|
|
6
|
+
export * from './tables-advanced.js';
|
|
6
7
|
export * from './content.js';
|
|
7
8
|
export * from './lists.js';
|
|
8
9
|
export * from './headers-footers.js';
|
|
@@ -13,6 +14,11 @@ export * from './watermarks.js';
|
|
|
13
14
|
export * from './navigation.js';
|
|
14
15
|
export * from './undo-redo.js';
|
|
15
16
|
export * from './export.js';
|
|
17
|
+
export * from './selection.js';
|
|
18
|
+
export * from './track-changes.js';
|
|
19
|
+
export * from './toc.js';
|
|
20
|
+
export * from './footnotes.js';
|
|
21
|
+
export * from './find.js';
|
|
16
22
|
import { sectionBuilderTools } from './section-builders.js';
|
|
17
23
|
import { wordCreateTool, wordSaveTool, wordScreenshotTool } from './launch.js';
|
|
18
24
|
import { wordSetPageMarginsTool } from './page-setup.js';
|
|
@@ -21,6 +27,7 @@ import { launchTools } from './launch.js';
|
|
|
21
27
|
import { textTools } from './text.js';
|
|
22
28
|
import { formattingTools } from './formatting.js';
|
|
23
29
|
import { tablesTools } from './tables.js';
|
|
30
|
+
import { tablesAdvancedTools } from './tables-advanced.js';
|
|
24
31
|
import { contentTools } from './content.js';
|
|
25
32
|
import { listsTools } from './lists.js';
|
|
26
33
|
import { headersFootersTools } from './headers-footers.js';
|
|
@@ -31,11 +38,17 @@ import { watermarksTools } from './watermarks.js';
|
|
|
31
38
|
import { navigationTools } from './navigation.js';
|
|
32
39
|
import { undoRedoTools } from './undo-redo.js';
|
|
33
40
|
import { exportTools } from './export.js';
|
|
41
|
+
import { selectionTools } from './selection.js';
|
|
42
|
+
import { trackChangesTools } from './track-changes.js';
|
|
43
|
+
import { tocTools } from './toc.js';
|
|
44
|
+
import { footnotesTools } from './footnotes.js';
|
|
45
|
+
import { findTools } from './find.js';
|
|
34
46
|
export const WORD_TOOLS = [
|
|
35
47
|
...launchTools,
|
|
36
48
|
...textTools,
|
|
37
49
|
...formattingTools,
|
|
38
50
|
...tablesTools,
|
|
51
|
+
...tablesAdvancedTools,
|
|
39
52
|
...contentTools,
|
|
40
53
|
...listsTools,
|
|
41
54
|
...headersFootersTools,
|
|
@@ -46,6 +59,11 @@ export const WORD_TOOLS = [
|
|
|
46
59
|
...navigationTools,
|
|
47
60
|
...undoRedoTools,
|
|
48
61
|
...exportTools,
|
|
62
|
+
...selectionTools,
|
|
63
|
+
...trackChangesTools,
|
|
64
|
+
...tocTools,
|
|
65
|
+
...footnotesTools,
|
|
66
|
+
...findTools,
|
|
49
67
|
];
|
|
50
68
|
export const WORD_CREATE_TOOLS = [
|
|
51
69
|
wordCreateTool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/index.ts"],"names":[],"mappings":"AAQA,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAI1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE5G,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,YAA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AsB;IACtB,oBAAoB;IACpB,oBAAoB;IACpB,wBAAwB;IACxB,GAAG,mBAAmB;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/launch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/launch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAc,MAAM,gBAAgB,CAAC;AA6C3D,eAAO,MAAM,cAAc,EAAE,aAK5B,CAAC;AAyCF,eAAO,MAAM,YAAY,EAAE,aAK1B,CAAC;AA0CF,eAAO,MAAM,YAAY,EAAE,aAK1B,CAAC;AA4CF,eAAO,MAAM,kBAAkB,EAAE,aAKhC,CAAC;AA0CF,eAAO,MAAM,aAAa,EAAE,aAK3B,CAAC;AA0CF,eAAO,MAAM,YAAY,EAAE,aAK1B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,aAAa,EAOtC,CAAC"}
|
|
@@ -1,45 +1,13 @@
|
|
|
1
1
|
import { wordClient } from '../word-client.js';
|
|
2
2
|
import { saveScreenshot, delay, APP_LAUNCH_DELAY_MS } from '../common/utils.js';
|
|
3
3
|
import { OFFICE_CATEGORIES } from '../common/constants.js';
|
|
4
|
-
|
|
5
|
-
type: 'function',
|
|
6
|
-
function: {
|
|
7
|
-
name: 'word_launch',
|
|
8
|
-
description: `Launch Microsoft Word for document editing.
|
|
9
|
-
Use this tool to start Word before creating or editing documents.
|
|
10
|
-
The Word window will be visible so you can see the changes in real-time.`,
|
|
11
|
-
parameters: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
properties: {
|
|
14
|
-
reason: { type: 'string', description: 'Explanation of why you are launching Word' },
|
|
15
|
-
},
|
|
16
|
-
required: ['reason'],
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
async function executeWordLaunch(_args) {
|
|
21
|
-
try {
|
|
22
|
-
const response = await wordClient.wordLaunch();
|
|
23
|
-
if (response.success) {
|
|
24
|
-
return { success: true, result: response.message || 'Word launched successfully' };
|
|
25
|
-
}
|
|
26
|
-
return { success: false, error: response.error || 'Failed to launch Word' };
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
return { success: false, error: `Failed to launch Word: ${error instanceof Error ? error.message : String(error)}` };
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
export const wordLaunchTool = {
|
|
33
|
-
definition: WORD_LAUNCH_DEFINITION,
|
|
34
|
-
execute: executeWordLaunch,
|
|
35
|
-
categories: OFFICE_CATEGORIES,
|
|
36
|
-
description: 'Launch Microsoft Word',
|
|
37
|
-
};
|
|
4
|
+
import { logger } from '../../../utils/logger.js';
|
|
38
5
|
const WORD_CREATE_DEFINITION = {
|
|
39
6
|
type: 'function',
|
|
40
7
|
function: {
|
|
41
8
|
name: 'word_create',
|
|
42
|
-
description: `Create a new Word document
|
|
9
|
+
description: `Create a new Word document. Automatically launches Word if it is not already running.
|
|
10
|
+
Use this tool to start working with a new document.`,
|
|
43
11
|
parameters: {
|
|
44
12
|
type: 'object',
|
|
45
13
|
properties: {
|
|
@@ -50,15 +18,20 @@ const WORD_CREATE_DEFINITION = {
|
|
|
50
18
|
},
|
|
51
19
|
};
|
|
52
20
|
async function executeWordCreate(_args) {
|
|
21
|
+
const startTime = Date.now();
|
|
22
|
+
logger.toolStart('word_create', _args);
|
|
53
23
|
try {
|
|
54
24
|
const response = await wordClient.wordCreate();
|
|
55
25
|
if (response.success) {
|
|
56
26
|
await delay(APP_LAUNCH_DELAY_MS);
|
|
27
|
+
logger.toolSuccess('word_create', _args, { message: response.message }, Date.now() - startTime);
|
|
57
28
|
return { success: true, result: response.message || 'New document created' };
|
|
58
29
|
}
|
|
30
|
+
logger.toolError('word_create', _args, new Error(response.error || 'Failed to create document'), Date.now() - startTime);
|
|
59
31
|
return { success: false, error: response.error || 'Failed to create document' };
|
|
60
32
|
}
|
|
61
33
|
catch (error) {
|
|
34
|
+
logger.toolError('word_create', _args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
62
35
|
return { success: false, error: `Failed to create document: ${error instanceof Error ? error.message : String(error)}` };
|
|
63
36
|
}
|
|
64
37
|
}
|
|
@@ -84,15 +57,20 @@ const WORD_OPEN_DEFINITION = {
|
|
|
84
57
|
},
|
|
85
58
|
};
|
|
86
59
|
async function executeWordOpen(args) {
|
|
60
|
+
const startTime = Date.now();
|
|
61
|
+
logger.toolStart('word_open', args);
|
|
87
62
|
try {
|
|
88
63
|
const response = await wordClient.wordOpen(args['path']);
|
|
89
64
|
if (response.success) {
|
|
90
65
|
await delay(APP_LAUNCH_DELAY_MS);
|
|
66
|
+
logger.toolSuccess('word_open', args, { document_name: response['document_name'] }, Date.now() - startTime);
|
|
91
67
|
return { success: true, result: `Document opened: ${response['document_name'] || args['path']}` };
|
|
92
68
|
}
|
|
69
|
+
logger.toolError('word_open', args, new Error(response.error || 'Failed to open document'), Date.now() - startTime);
|
|
93
70
|
return { success: false, error: response.error || 'Failed to open document' };
|
|
94
71
|
}
|
|
95
72
|
catch (error) {
|
|
73
|
+
logger.toolError('word_open', args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
96
74
|
return { success: false, error: `Failed to open document: ${error instanceof Error ? error.message : String(error)}` };
|
|
97
75
|
}
|
|
98
76
|
}
|
|
@@ -118,16 +96,21 @@ const WORD_SAVE_DEFINITION = {
|
|
|
118
96
|
},
|
|
119
97
|
};
|
|
120
98
|
async function executeWordSave(args) {
|
|
99
|
+
const startTime = Date.now();
|
|
121
100
|
const filePath = args['path'];
|
|
101
|
+
logger.toolStart('word_save', args);
|
|
122
102
|
try {
|
|
123
103
|
const response = await wordClient.wordSave(filePath);
|
|
124
104
|
if (response.success) {
|
|
125
105
|
const savedPath = response['path'] || filePath || 'current location';
|
|
106
|
+
logger.toolSuccess('word_save', args, { path: savedPath }, Date.now() - startTime);
|
|
126
107
|
return { success: true, result: `Document saved to: ${savedPath}` };
|
|
127
108
|
}
|
|
109
|
+
logger.toolError('word_save', args, new Error(response.error || 'Failed to save document'), Date.now() - startTime);
|
|
128
110
|
return { success: false, error: response.error || 'Failed to save document' };
|
|
129
111
|
}
|
|
130
112
|
catch (error) {
|
|
113
|
+
logger.toolError('word_save', args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
131
114
|
return { success: false, error: `Failed to save document: ${error instanceof Error ? error.message : String(error)}` };
|
|
132
115
|
}
|
|
133
116
|
}
|
|
@@ -154,18 +137,23 @@ Use this to verify document formatting or show the user what the document looks
|
|
|
154
137
|
},
|
|
155
138
|
};
|
|
156
139
|
async function executeWordScreenshot(_args) {
|
|
140
|
+
const startTime = Date.now();
|
|
141
|
+
logger.toolStart('word_screenshot', _args);
|
|
157
142
|
try {
|
|
158
143
|
const response = await wordClient.wordScreenshot();
|
|
159
144
|
if (response.success && response.image) {
|
|
160
145
|
const filePath = await saveScreenshot(response.image, 'word');
|
|
146
|
+
logger.toolSuccess('word_screenshot', _args, { filePath }, Date.now() - startTime);
|
|
161
147
|
return {
|
|
162
148
|
success: true,
|
|
163
149
|
result: `Word screenshot saved to: ${filePath}\n\nTo verify this screenshot, call read_image with file_path="${filePath}"`,
|
|
164
150
|
};
|
|
165
151
|
}
|
|
152
|
+
logger.toolError('word_screenshot', _args, new Error(response.error || 'Failed to capture screenshot'), Date.now() - startTime);
|
|
166
153
|
return { success: false, error: response.error || 'Failed to capture screenshot' };
|
|
167
154
|
}
|
|
168
155
|
catch (error) {
|
|
156
|
+
logger.toolError('word_screenshot', _args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
169
157
|
return { success: false, error: `Failed to capture screenshot: ${error instanceof Error ? error.message : String(error)}` };
|
|
170
158
|
}
|
|
171
159
|
}
|
|
@@ -192,15 +180,20 @@ Optionally save before closing.`,
|
|
|
192
180
|
},
|
|
193
181
|
};
|
|
194
182
|
async function executeWordClose(args) {
|
|
183
|
+
const startTime = Date.now();
|
|
195
184
|
const save = args['save'] === true;
|
|
185
|
+
logger.toolStart('word_close', args);
|
|
196
186
|
try {
|
|
197
187
|
const response = await wordClient.wordClose(save);
|
|
198
188
|
if (response.success) {
|
|
189
|
+
logger.toolSuccess('word_close', args, { saved: save }, Date.now() - startTime);
|
|
199
190
|
return { success: true, result: `Document closed${save ? ' (saved)' : ''}` };
|
|
200
191
|
}
|
|
192
|
+
logger.toolError('word_close', args, new Error(response.error || 'Failed to close document'), Date.now() - startTime);
|
|
201
193
|
return { success: false, error: response.error || 'Failed to close document' };
|
|
202
194
|
}
|
|
203
195
|
catch (error) {
|
|
196
|
+
logger.toolError('word_close', args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
204
197
|
return { success: false, error: `Failed to close document: ${error instanceof Error ? error.message : String(error)}` };
|
|
205
198
|
}
|
|
206
199
|
}
|
|
@@ -227,15 +220,20 @@ Optionally save all documents before quitting.`,
|
|
|
227
220
|
},
|
|
228
221
|
};
|
|
229
222
|
async function executeWordQuit(args) {
|
|
223
|
+
const startTime = Date.now();
|
|
230
224
|
const save = args['save'] === true;
|
|
225
|
+
logger.toolStart('word_quit', args);
|
|
231
226
|
try {
|
|
232
227
|
const response = await wordClient.wordQuit(save);
|
|
233
228
|
if (response.success) {
|
|
229
|
+
logger.toolSuccess('word_quit', args, { saved: save }, Date.now() - startTime);
|
|
234
230
|
return { success: true, result: `Word closed${save ? ' (all documents saved)' : ''}` };
|
|
235
231
|
}
|
|
232
|
+
logger.toolError('word_quit', args, new Error(response.error || 'Failed to quit Word'), Date.now() - startTime);
|
|
236
233
|
return { success: false, error: response.error || 'Failed to quit Word' };
|
|
237
234
|
}
|
|
238
235
|
catch (error) {
|
|
236
|
+
logger.toolError('word_quit', args, error instanceof Error ? error : new Error(String(error)), Date.now() - startTime);
|
|
239
237
|
return { success: false, error: `Failed to quit Word: ${error instanceof Error ? error.message : String(error)}` };
|
|
240
238
|
}
|
|
241
239
|
}
|
|
@@ -246,7 +244,6 @@ export const wordQuitTool = {
|
|
|
246
244
|
description: 'Quit Microsoft Word',
|
|
247
245
|
};
|
|
248
246
|
export const launchTools = [
|
|
249
|
-
wordLaunchTool,
|
|
250
247
|
wordCreateTool,
|
|
251
248
|
wordOpenTool,
|
|
252
249
|
wordSaveTool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/launch.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/launch.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAMlD,MAAM,sBAAsB,GAAmB;IAC7C,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE;oDACmC;QAChD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iCAAiC,EAAE;aAC3E;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC;AAEF,KAAK,UAAU,iBAAiB,CAAC,KA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Y;IACZ,kBAAkB;IAClB,aAAa;IACb,YAAY;CACb,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LLMSimpleTool } from '../../types.js';
|
|
2
|
+
export declare const wordDeleteTextTool: LLMSimpleTool;
|
|
3
|
+
export declare const wordGetSelectionTool: LLMSimpleTool;
|
|
4
|
+
export declare const wordSelectRangeTool: LLMSimpleTool;
|
|
5
|
+
export declare const wordMoveCursorTool: LLMSimpleTool;
|
|
6
|
+
export declare const wordMoveCursorToTool: LLMSimpleTool;
|
|
7
|
+
export declare const selectionTools: LLMSimpleTool[];
|
|
8
|
+
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../src/tools/office/word-tools/selection.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAc,MAAM,gBAAgB,CAAC;AA0C3D,eAAO,MAAM,kBAAkB,EAAE,aAKhC,CAAC;AA0CF,eAAO,MAAM,oBAAoB,EAAE,aAKlC,CAAC;AAwCF,eAAO,MAAM,mBAAmB,EAAE,aAKjC,CAAC;AA0CF,eAAO,MAAM,kBAAkB,EAAE,aAKhC,CAAC;AAkCF,eAAO,MAAM,oBAAoB,EAAE,aAKlC,CAAC;AAMF,eAAO,MAAM,cAAc,EAAE,aAAa,EAMzC,CAAC"}
|