-
Notifications
You must be signed in to change notification settings - Fork 2
/
package.json
279 lines (279 loc) · 11.3 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
{
"name": "write-assist-ai",
"displayName": "Write Assist AI",
"description": "Fully customizable AI-powered Text Rewriter/Paraphraser for VS Code. Boost your writing productivity and creativity with AI-powered rewrites! This extension seamlessly integrates with VS Code, allowing you to rewrite text in Markdown, LaTeX, and plain text files using the latest OpenAI models.",
"version": "0.5.0",
"publisher": "ra-jeev",
"repository": {
"url": "https://github.com/ra-jeev/write-assist-ai"
},
"bugs": {
"url": "https://github.com/ra-jeev/write-assist-ai/issues"
},
"sponsor": {
"url": "https://github.com/sponsors/ra-jeev"
},
"engines": {
"vscode": "^1.92.0"
},
"categories": [
"Other"
],
"keywords": [
"writing",
"assistant",
"markdown",
"openai",
"latex",
"text",
"chatgpt",
"rewrite",
"rewriting"
],
"icon": "assets/images/icon.png",
"galleryBanner": {
"theme": "light",
"color": "#ffc600"
},
"activationEvents": [
"onLanguage:markdown",
"onLanguage:plaintext",
"onLanguage:latex",
"onLanguage:tex",
"onLanguage:bibtex"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "writeAssistAi.openAiApiKey",
"title": "Set the OpenAI Api Key",
"shortTitle": "OpenAI Api Key",
"category": "Write Assist AI"
}
],
"configuration": {
"title": "Write Assist AI",
"properties": {
"writeAssistAi.maxTokens": {
"type": "integer",
"default": 1200,
"order": 0,
"description": "Set the maximum number of tokens to use for each API call"
},
"writeAssistAi.temperature": {
"type": "number",
"default": 0.3,
"minimum": 0,
"maximum": 2,
"order": 1,
"description": "Set the temperature parameter (0-2) for the API calls"
},
"writeAssistAi.openAi.model": {
"type": "string",
"enum": [
"gpt-4o",
"gpt-4o-mini",
"gpt-4-turbo",
"gpt-4-turbo-preview",
"gpt-4-1106-preview",
"gpt-4",
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"custom"
],
"default": "gpt-4o",
"order": 2,
"description": "Choose the default OpenAI model"
},
"writeAssistAi.openAi.customModel": {
"type": "string",
"order": 3,
"markdownDescription": "The custom OpenAI model to use (used only when '#writeAssistAi.openAi.model#' is set to `custom`).\n\nIf no value is provided then the default configured model will be used instead."
},
"writeAssistAi.openAi.proxyUrl": {
"type": "string",
"order": 4,
"markdownDescription": "Proxy server URL (if any). No validation is done on the URL.\n\nUse a fully qualified URL along with the port e.g. `http://localhost:8080`"
},
"writeAssistAi.systemPrompt": {
"type": "string",
"default": "You are a helpful assistant. Your job is to perform the tasks related to rewriting text inputs given by the user. If the input text contains any special syntax then strictly follow that syntax, e.g. for markdown return markdown, for latex return latex etc. Do not return markdown for latex, and vice versa.",
"order": 5,
"scope": "language-overridable",
"editPresentation": "multilineText",
"markdownDescription": "Set the system prompt to use for the API calls. The prompt specific to a performed action will be in addition to this system prompt.\n\n**Language Specific Config:** You can also different system prompts for different languages. To do that open your VS Code settings UI and type `@lang:<languageId> Write Assist AI` e.g. `@lang:markdown Write Assist AI` and set the System Prompt for the selected language."
},
"writeAssistAi.separatorText": {
"type": "string",
"default": "********************************",
"order": 6,
"markdownDescription": "The separator text that should appear around the rewritten text. Leave it empty for no separator."
},
"writeAssistAi.quickFixes": {
"type": "array",
"items": {
"type": "object",
"examples": [
{
"title": "<command name/short title>",
"description": "<command description>",
"prompt": "<LLM prompt for the given command>"
}
],
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The command title. Shows up in the editor tooltip menu"
},
"description": {
"type": "string",
"default": "",
"description": "The description of the command"
},
"prompt": {
"type": "string",
"default": "",
"description": "The prompt to use for this command when interacting with an LLM"
}
},
"additionalProperties": false,
"required": [
"title",
"description",
"prompt"
]
},
"default": [
{
"title": "Rephrase the selected text",
"description": "Rephrases the selected text",
"prompt": "Rephrase the given text and make the sentences more clear and readable."
},
{
"title": "Suggest headlines for selection",
"description": "Suggests some appropriate headlines for the selected text",
"prompt": "Suggest 2-3 short headlines based on the given text."
},
{
"title": "Summarize the selected text",
"description": "Writes a summary for the selected text",
"prompt": "Write a short summary for the given text."
},
{
"title": "Expand the selected text",
"description": "Builds upon the selected text and makes it verbose",
"prompt": "Continue building on the given text, make it better and verbose."
},
{
"title": "Shorten the selected text",
"description": "Based on the selected text tries to make it concise",
"prompt": "Try to make the given text concise while keeping its essence."
}
],
"scope": "language-overridable",
"markdownDescription": "The commands that will show up in the quick fix section of the editor tooltip when you select some text.\n\n**Language Specific Config:** To configure actions per language, just put the new actions under the particular language config block, e.g. for markdown, put `\"writeAssistAi.quickFixes\"` under `\"[markdown]\"` block.\n\n**Example Action Config:**\n```json\n[\n {\n \"title\": \"<command name/short title>\",\n \"description\": \"<command description>\",\n \"prompt\": \"<LLM prompt for the given command>\"\n }\n]\n```"
},
"writeAssistAi.rewriteOptions": {
"type": "array",
"items": {
"type": "object",
"examples": [
{
"title": "<command name/short title>",
"description": "<command description>",
"prompt": "<LLM prompt for the given command>"
}
],
"properties": {
"title": {
"type": "string",
"default": "",
"description": "The command title. Shows up in the editor tooltip menu"
},
"description": {
"type": "string",
"default": "",
"description": "The description of the command"
},
"prompt": {
"type": "string",
"default": "",
"description": "The prompt to use for this command when interacting with an LLM"
}
},
"additionalProperties": false,
"required": [
"title",
"description",
"prompt"
]
},
"default": [
{
"title": "Change to professional tone",
"description": "Changes the selected text's tone to professional",
"prompt": "Make the given text better and rewrite it in a professional tone."
},
{
"title": "Change to casual tone",
"description": "Changes the selected text's tone to casual",
"prompt": "Make the given text better and rewrite it in a casual tone."
},
{
"title": "Change to formal tone",
"description": "Changes the selected text's tone to formal",
"prompt": "Make the given text better and rewrite it in a formal tone."
},
{
"title": "Change to friendly tone",
"description": "Changes the selected text's tone to friendly",
"prompt": "Make the given text better and rewrite it in a friendly tone."
},
{
"title": "Change to informative tone",
"description": "Changes the selected text's tone to informative",
"prompt": "Make the given text better and rewrite it in an informative tone."
},
{
"title": "Change to authoritative tone",
"description": "Changes the selected text's tone to authoritative",
"prompt": "Make the given text better and rewrite it in an authoritative tone."
}
],
"scope": "language-overridable",
"markdownDescription": "The commands that will show up in the rewrite section of the editor tooltip when you select some text.\n\n**Language Specific Config:** To configure actions per language, just put the new actions under the particular language config block, e.g. for markdown, put `\"writeAssistAi.rewriteOptions\"` under `\"[markdown]\"` block.\n\n**Example Action Config:**\n```json\n[\n {\n \"title\": \"<command name/short title>\",\n \"description\": \"<command description>\",\n \"prompt\": \"<LLM prompt for the given command>\"\n }\n]\n```"
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest": "npm run compile-tests && npm run compile && npm run lint",
"lint": "eslint src",
"test": "vscode-test"
},
"devDependencies": {
"@types/mocha": "^10.0.8",
"@types/node": "20.x",
"@types/vscode": "^1.92.0",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"@typescript-eslint/parser": "^8.5.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"eslint": "^9.10.0",
"ts-loader": "^9.5.1",
"typescript": "^5.6.2",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"openai": "^4.61.1"
}
}