-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
176 lines (176 loc) · 5.96 KB
/
Copy pathpackage.json
File metadata and controls
176 lines (176 loc) · 5.96 KB
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
{
"name": "mortar",
"displayName": "Mortar",
"description": "minimal fill-in-middle autocomplete backed by a remote llama.cpp or openai-compatible server",
"version": "0.1.0",
"publisher": "khimaros",
"license": "GPL-3.0-or-later",
"icon": "resources/logo.png",
"repository": {
"type": "git",
"url": "https://github.com/khimaros/mortar"
},
"engines": {
"vscode": "^1.85.0"
},
"categories": ["Programming Languages", "Machine Learning"],
"activationEvents": ["onStartupFinished"],
"main": "./out/extension.js",
"contributes": {
"configuration": {
"title": "Mortar",
"properties": {
"mortar.endpoint": {
"type": "string",
"default": "http://localhost:7860",
"description": "base url of the inference server (e.g. http://localhost:7860). a trailing /v1 or /infill is stripped automatically."
},
"mortar.model": {
"type": "string",
"default": "",
"description": "model name to request (e.g. qwen3-coder-30b-a3b-instruct:Q8_0). optional if the server has a single loaded model."
},
"mortar.apiKey": {
"type": "string",
"default": "",
"description": "optional bearer token sent as Authorization header."
},
"mortar.mode": {
"type": "string",
"enum": ["auto", "infill", "openai"],
"default": "auto",
"description": "auto: probe /infill, fall back to /v1/completions. infill: force native llama.cpp /infill. openai: force /v1/completions with a fim prompt template."
},
"mortar.openaiPromptTemplate": {
"type": "string",
"default": "<|fim_prefix|>{prefix}{prompt}<|fim_suffix|>{suffix}<|fim_middle|>",
"description": "prompt template for openai mode. placeholders: {prefix} {prompt} {suffix}."
},
"mortar.openaiStopStrings": {
"type": "array",
"items": { "type": "string" },
"default": ["<|fim_prefix|>", "<|fim_suffix|>", "<|fim_middle|>", "<|endoftext|>", "<|file_sep|>", "<|repo_name|>"],
"description": "stop strings used in openai mode."
},
"mortar.nPrefix": {
"type": "integer",
"default": 256,
"description": "number of lines before the cursor to include as input_prefix."
},
"mortar.nSuffix": {
"type": "integer",
"default": 64,
"description": "number of lines after the cursor to include as input_suffix."
},
"mortar.nPredict": {
"type": "integer",
"default": 128,
"description": "max tokens to predict."
},
"mortar.tMaxPromptMs": {
"type": "integer",
"default": 500,
"description": "max alloted time for prompt processing (native infill only)."
},
"mortar.tMaxPredictMs": {
"type": "integer",
"default": 1000,
"description": "max alloted time for prediction (native infill only)."
},
"mortar.debounceMs": {
"type": "integer",
"default": 150,
"description": "debounce delay before an automatic completion fires."
},
"mortar.maxLineSuffix": {
"type": "integer",
"default": 8,
"description": "skip automatic completion if more than this many characters follow the cursor on the current line."
},
"mortar.auto": {
"type": "boolean",
"default": true,
"description": "trigger completions automatically while typing."
},
"mortar.maxCacheKeys": {
"type": "integer",
"default": 250,
"description": "max entries in the lru completion cache."
},
"mortar.statusBar": {
"type": "boolean",
"default": true,
"description": "show the mortar status bar indicator."
},
"mortar.statusBarTimings": {
"type": "boolean",
"default": false,
"description": "show completion timings inline in the status bar text. when false, timings are only visible in the tooltip."
},
"mortar.ringNChunks": {
"type": "integer",
"default": 16,
"description": "max number of chunks from recently-edited buffers to send as extra context. 0 disables."
},
"mortar.prefetch": {
"type": "boolean",
"default": false,
"description": "speculatively fetch the next completion assuming the current one is accepted, and cache it."
}
}
},
"commands": [
{
"command": "mortar.triggerCompletion",
"title": "Mortar: Trigger Completion"
},
{
"command": "mortar.toggleAuto",
"title": "Mortar: Toggle Automatic Completion"
},
{
"command": "mortar.configureEndpoint",
"title": "Mortar: Configure Endpoint"
},
{
"command": "mortar.selectModel",
"title": "Mortar: Select Model"
},
{
"command": "mortar.setup",
"title": "Mortar: Run Setup"
},
{
"command": "mortar.showMenu",
"title": "Mortar: Show Menu"
},
{
"command": "mortar.openSettings",
"title": "Mortar: Open Settings"
},
{
"command": "mortar.acceptLine",
"title": "Mortar: Accept Next Line of Completion"
},
{
"command": "mortar.acceptWord",
"title": "Mortar: Accept Next Word of Completion"
}
]
},
"scripts": {
"compile": "tsc -p .",
"watch": "tsc -p . --watch",
"lint": "eslint src --ext ts",
"test": "npm run compile && node --test test/*.test.mjs",
"precommit": "npm run lint && npm run compile && npm run test"
},
"devDependencies": {
"@types/node": "^20.11.0",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.56.0",
"typescript": "^5.4.0"
}
}