-
Notifications
You must be signed in to change notification settings - Fork 3
/
package.json
182 lines (182 loc) · 4.23 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
{
"name": "novel",
"displayName": "novel",
"description": "网文写作插件,提供高亮、提示、gpt等功能",
"version": "0.4.1",
"publisher": "eirueirufu",
"icon": "media/novel.png",
"engines": {
"vscode": "^1.67.0",
"node": ">=12.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/eirueirufu/novel"
},
"activationEvents": [
"onLanguage:novel"
],
"categories": [
"Programming Languages"
],
"files": [
"media/completion"
],
"contributes": {
"configuration": {
"title": "novel自定义配置",
"type": "object",
"properties": {
"novel.highlightWords": {
"type": "array",
"default": [],
"description": "高亮配置"
},
"novel.completionFilePath": {
"type": "string",
"default": "",
"description": "提示文件"
},
"novel.openaiKey": {
"type": "string",
"default": "",
"description": "openai的api key,可以自己在opanai官网生成"
},
"novel.openaiBaseURL": {
"type": "string",
"description": "自定义openai的请求地址"
},
"novel.gptModel": {
"type": "string",
"default": "gpt-3.5-turbo",
"description": "gpt模型"
},
"novel.gptChatSystem": {
"type": "string",
"default": "你是一个专业的网文作者",
"description": "gpt聊天system设定"
},
"novel.maxParaLen": {
"type": "number",
"description": "格式化每个段落的长度",
"default": 20
}
}
},
"commands": [
{
"command": "highlight.select",
"title": "显示高亮"
},
{
"command": "highlight.selectCancel",
"title": "取消高亮"
},
{
"command": "gpt.quest",
"title": "提问gpt"
},
{
"command": "gpt.config",
"title": "apikey配置"
},
{
"command": "completion.selectConfigFile",
"title": "选择提示配置文件",
"icon": {
"light": "media/light/document.svg",
"dark": "media/dark/document.svg"
}
}
],
"viewsContainers": {
"activitybar": [
{
"id": "novel",
"title": "Novel",
"icon": "media/dep.svg"
}
]
},
"menus": {
"editor/context": [
{
"command": "gpt.quest",
"when": "editorLangId == 'novel'",
"group": "navigation@1"
},
{
"command": "highlight.select",
"when": "editorLangId == 'novel'",
"group": "navigation@2"
},
{
"command": "highlight.selectCancel",
"when": "editorLangId == 'novel'",
"group": "navigation@3"
},
{
"command": "gpt.config",
"when": "editorLangId == 'novel'",
"group": "navigation@4"
}
]
},
"languages": [
{
"id": "novel",
"extensions": [
".novel",
".nv"
],
"icon": {
"light": "media/light/novel.png",
"dark": "media/dark/novel.png"
},
"configuration": "./language-configuration.json"
}
]
},
"main": "./out/extension.js",
"scripts": {
"package": "npx vsce package",
"compile": "tsc -p ./",
"lint": "gts lint src/",
"watch": "tsc -watch -p ./",
"clean": "gts clean",
"format": "prettier --write \"src/**/*.ts\"",
"pretest": "npm run compile",
"test": "node ./out/test/runTest.js",
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --inject:./import-meta-url.js --define:import.meta.url=import_meta_url",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"antlrgen": "cd ./src/format && antlr4 -Dlanguage=TypeScript -visitor Format.g4"
},
"dependencies": {
"antlr4": "^4.13.1",
"fuse.js": "^6.6.2",
"glob": "^7.1.4",
"openai": "^4.7.1",
"wikipedia": "^2.1.1"
},
"devDependencies": {
"@types/glob": "7.1.3",
"@types/mocha": "7.0.2",
"@types/node": "^16.11.7",
"@types/sinon": "^10.0.16",
"@types/vscode": "1.67.0",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"@vscode/test-electron": "^1.6.1",
"@vscode/vsce": "2.19.0",
"esbuild": "^0.18.11",
"eslint": "^8.26.0",
"gts": "^3.1.1",
"mocha": "^10.2.0",
"prettier": "2.2.1",
"sinon": "^16.0.0",
"source-map-support": "^0.5.12",
"typescript": "^5.1.6"
}
}