@jupyterlite/ai 0.17.0 → 0.19.0
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/lib/chat-commands/clear.d.ts +1 -0
- package/lib/chat-commands/index.d.ts +1 -0
- package/lib/chat-commands/skills.d.ts +2 -1
- package/lib/chat-model-handler.d.ts +4 -3
- package/lib/chat-model-handler.js +2 -1
- package/lib/chat-model.d.ts +148 -8
- package/lib/chat-model.js +368 -79
- package/lib/completion/completion-provider.d.ts +3 -1
- package/lib/completion/completion-provider.js +1 -2
- package/lib/completion/index.d.ts +1 -0
- package/lib/components/clear-button.d.ts +1 -0
- package/lib/components/clear-button.js +3 -4
- package/lib/components/completion-status.d.ts +1 -0
- package/lib/components/completion-status.js +5 -4
- package/lib/components/index.d.ts +1 -0
- package/lib/components/model-select.d.ts +1 -0
- package/lib/components/model-select.js +62 -67
- package/lib/components/save-button.d.ts +3 -2
- package/lib/components/save-button.js +4 -5
- package/lib/components/stop-button.d.ts +1 -0
- package/lib/components/stop-button.js +3 -4
- package/lib/components/tool-select.d.ts +3 -1
- package/lib/components/tool-select.js +47 -60
- package/lib/components/usage-display.d.ts +4 -2
- package/lib/components/usage-display.js +50 -61
- package/lib/diff-manager.d.ts +3 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +50 -59
- package/lib/models/settings-model.d.ts +3 -1
- package/lib/models/settings-model.js +1 -0
- package/lib/rendered-message-outputarea.d.ts +1 -0
- package/lib/tokens.d.ts +48 -597
- package/lib/tokens.js +2 -31
- package/lib/widgets/ai-settings.d.ts +3 -1
- package/lib/widgets/ai-settings.js +185 -344
- package/lib/widgets/main-area-chat.d.ts +3 -3
- package/lib/widgets/main-area-chat.js +2 -4
- package/lib/widgets/provider-config-dialog.d.ts +2 -1
- package/lib/widgets/provider-config-dialog.js +102 -167
- package/package.json +111 -258
- package/schema/settings-model.json +6 -0
- package/src/chat-commands/skills.ts +2 -2
- package/src/chat-model-handler.ts +10 -6
- package/src/chat-model.ts +488 -96
- package/src/completion/completion-provider.ts +6 -6
- package/src/components/clear-button.tsx +0 -2
- package/src/components/completion-status.tsx +2 -2
- package/src/components/model-select.tsx +1 -1
- package/src/components/save-button.tsx +3 -3
- package/src/components/stop-button.tsx +0 -2
- package/src/components/tool-select.tsx +10 -9
- package/src/components/usage-display.tsx +4 -2
- package/src/diff-manager.ts +4 -3
- package/src/index.ts +103 -107
- package/src/models/settings-model.ts +7 -6
- package/src/tokens.ts +54 -744
- package/src/widgets/ai-settings.tsx +40 -11
- package/src/widgets/main-area-chat.ts +5 -8
- package/src/widgets/provider-config-dialog.tsx +8 -8
- package/LICENSE +0 -30
- package/README.md +0 -49
- package/lib/agent.d.ts +0 -277
- package/lib/agent.js +0 -1116
- package/lib/icons.d.ts +0 -3
- package/lib/icons.js +0 -8
- package/lib/providers/built-in-providers.d.ts +0 -21
- package/lib/providers/built-in-providers.js +0 -233
- package/lib/providers/generated-context-windows.d.ts +0 -8
- package/lib/providers/generated-context-windows.js +0 -96
- package/lib/providers/model-info.d.ts +0 -3
- package/lib/providers/model-info.js +0 -58
- package/lib/providers/models.d.ts +0 -37
- package/lib/providers/models.js +0 -28
- package/lib/providers/provider-registry.d.ts +0 -49
- package/lib/providers/provider-registry.js +0 -72
- package/lib/providers/provider-tools.d.ts +0 -36
- package/lib/providers/provider-tools.js +0 -93
- package/lib/skills/index.d.ts +0 -4
- package/lib/skills/index.js +0 -7
- package/lib/skills/parse-skill.d.ts +0 -25
- package/lib/skills/parse-skill.js +0 -69
- package/lib/skills/skill-loader.d.ts +0 -25
- package/lib/skills/skill-loader.js +0 -133
- package/lib/skills/skill-registry.d.ts +0 -31
- package/lib/skills/skill-registry.js +0 -100
- package/lib/skills/types.d.ts +0 -29
- package/lib/skills/types.js +0 -5
- package/lib/tools/commands.d.ts +0 -11
- package/lib/tools/commands.js +0 -154
- package/lib/tools/skills.d.ts +0 -9
- package/lib/tools/skills.js +0 -73
- package/lib/tools/tool-registry.d.ts +0 -35
- package/lib/tools/tool-registry.js +0 -55
- package/lib/tools/web.d.ts +0 -8
- package/lib/tools/web.js +0 -196
- package/src/agent.ts +0 -1441
- package/src/icons.ts +0 -11
- package/src/providers/built-in-providers.ts +0 -241
- package/src/providers/generated-context-windows.ts +0 -102
- package/src/providers/model-info.ts +0 -88
- package/src/providers/models.ts +0 -76
- package/src/providers/provider-registry.ts +0 -88
- package/src/providers/provider-tools.ts +0 -179
- package/src/skills/index.ts +0 -14
- package/src/skills/parse-skill.ts +0 -91
- package/src/skills/skill-loader.ts +0 -175
- package/src/skills/skill-registry.ts +0 -137
- package/src/skills/types.ts +0 -37
- package/src/tools/commands.ts +0 -210
- package/src/tools/skills.ts +0 -84
- package/src/tools/tool-registry.ts +0 -63
- package/src/tools/web.ts +0 -238
- package/src/types.d.ts +0 -4
- package/style/icons/jupyternaut-lite.svg +0 -7
package/package.json
CHANGED
|
@@ -1,261 +1,114 @@
|
|
|
1
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
|
-
"rimraf": "^5.0.1",
|
|
113
|
-
"source-map-loader": "^1.0.2",
|
|
114
|
-
"style-loader": "^3.3.1",
|
|
115
|
-
"stylelint": "^15.10.1",
|
|
116
|
-
"stylelint-config-recommended": "^13.0.0",
|
|
117
|
-
"stylelint-config-standard": "^34.0.0",
|
|
118
|
-
"stylelint-csstree-validator": "^3.0.0",
|
|
119
|
-
"stylelint-prettier": "^4.0.0",
|
|
120
|
-
"typescript": "~5.8.0",
|
|
121
|
-
"yjs": "^13.5.0"
|
|
122
|
-
},
|
|
123
|
-
"sideEffects": [
|
|
124
|
-
"style/*.css",
|
|
125
|
-
"style/index.js"
|
|
126
|
-
],
|
|
127
|
-
"styleModule": "style/index.js",
|
|
128
|
-
"publishConfig": {
|
|
129
|
-
"access": "public"
|
|
130
|
-
},
|
|
131
|
-
"jupyterlab": {
|
|
132
|
-
"extension": true,
|
|
133
|
-
"outputDir": "jupyterlite_ai/labextension",
|
|
134
|
-
"schemaDir": "schema",
|
|
135
|
-
"sharedPackages": {
|
|
136
|
-
"@jupyter/chat": {
|
|
137
|
-
"bundled": true,
|
|
138
|
-
"singleton": true
|
|
139
|
-
},
|
|
140
|
-
"jupyter-chat-components": {
|
|
141
|
-
"bundled": false,
|
|
142
|
-
"singleton": true
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"eslintIgnore": [
|
|
147
|
-
"node_modules",
|
|
148
|
-
"dist",
|
|
149
|
-
"coverage",
|
|
150
|
-
"**/*.d.ts",
|
|
151
|
-
"tests",
|
|
152
|
-
"**/__tests__",
|
|
153
|
-
"ui-tests",
|
|
154
|
-
".venv",
|
|
155
|
-
"webpack.config.js"
|
|
156
|
-
],
|
|
157
|
-
"eslintConfig": {
|
|
158
|
-
"extends": [
|
|
159
|
-
"eslint:recommended",
|
|
160
|
-
"plugin:@typescript-eslint/eslint-recommended",
|
|
161
|
-
"plugin:@typescript-eslint/recommended",
|
|
162
|
-
"plugin:prettier/recommended"
|
|
163
|
-
],
|
|
164
|
-
"parser": "@typescript-eslint/parser",
|
|
165
|
-
"parserOptions": {
|
|
166
|
-
"project": "tsconfig.json",
|
|
167
|
-
"sourceType": "module"
|
|
168
|
-
},
|
|
169
|
-
"plugins": [
|
|
170
|
-
"@typescript-eslint"
|
|
171
|
-
],
|
|
172
|
-
"rules": {
|
|
173
|
-
"@typescript-eslint/naming-convention": [
|
|
174
|
-
"error",
|
|
175
|
-
{
|
|
176
|
-
"selector": "interface",
|
|
177
|
-
"format": [
|
|
178
|
-
"PascalCase"
|
|
179
|
-
],
|
|
180
|
-
"custom": {
|
|
181
|
-
"regex": "^I[A-Z]",
|
|
182
|
-
"match": true
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
],
|
|
186
|
-
"@typescript-eslint/no-unused-vars": [
|
|
187
|
-
"warn",
|
|
188
|
-
{
|
|
189
|
-
"args": "none"
|
|
190
|
-
}
|
|
191
|
-
],
|
|
192
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
193
|
-
"@typescript-eslint/no-namespace": "off",
|
|
194
|
-
"@typescript-eslint/no-use-before-define": "off",
|
|
195
|
-
"@typescript-eslint/quotes": [
|
|
196
|
-
"error",
|
|
197
|
-
"single",
|
|
198
|
-
{
|
|
199
|
-
"avoidEscape": true,
|
|
200
|
-
"allowTemplateLiterals": false
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
"curly": [
|
|
204
|
-
"error",
|
|
205
|
-
"all"
|
|
206
|
-
],
|
|
207
|
-
"eqeqeq": "error",
|
|
208
|
-
"prefer-arrow-callback": "error",
|
|
209
|
-
"no-restricted-imports": [
|
|
210
|
-
"error",
|
|
211
|
-
{
|
|
212
|
-
"paths": [
|
|
213
|
-
{
|
|
214
|
-
"name": "@mui/icons-material",
|
|
215
|
-
"message": "Please import icons using path imports, e.g. `import AddIcon from '@mui/icons-material/Add'`"
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
"patterns": [
|
|
219
|
-
{
|
|
220
|
-
"group": [
|
|
221
|
-
"@mui/*/*/*"
|
|
222
|
-
],
|
|
223
|
-
"message": "3rd level imports in mui are considered private"
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
]
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
"prettier": {
|
|
231
|
-
"singleQuote": true,
|
|
232
|
-
"trailingComma": "none",
|
|
233
|
-
"arrowParens": "avoid",
|
|
234
|
-
"endOfLine": "auto",
|
|
235
|
-
"overrides": [
|
|
236
|
-
{
|
|
237
|
-
"files": "package.json",
|
|
238
|
-
"options": {
|
|
239
|
-
"tabWidth": 4
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
]
|
|
243
|
-
},
|
|
244
|
-
"stylelint": {
|
|
245
|
-
"extends": [
|
|
246
|
-
"stylelint-config-recommended",
|
|
247
|
-
"stylelint-config-standard",
|
|
248
|
-
"stylelint-prettier/recommended"
|
|
249
|
-
],
|
|
250
|
-
"plugins": [
|
|
251
|
-
"stylelint-csstree-validator"
|
|
252
|
-
],
|
|
253
|
-
"rules": {
|
|
254
|
-
"csstree/validator": true,
|
|
255
|
-
"property-no-vendor-prefix": null,
|
|
256
|
-
"selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$|^Mui[A-Z]",
|
|
257
|
-
"selector-no-vendor-prefix": null,
|
|
258
|
-
"value-no-vendor-prefix": null
|
|
259
|
-
}
|
|
2
|
+
"name": "@jupyterlite/ai",
|
|
3
|
+
"version": "0.19.0",
|
|
4
|
+
"description": "AI code completions and chat for JupyterLite",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jupyter",
|
|
7
|
+
"jupyterlab",
|
|
8
|
+
"jupyterlab-extension"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/jupyterlite/ai",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/jupyterlite/ai/issues"
|
|
13
|
+
},
|
|
14
|
+
"license": "BSD-3-Clause",
|
|
15
|
+
"author": "JupyterLite Contributors",
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf,md}",
|
|
18
|
+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
|
|
19
|
+
"src/**/*.{ts,tsx}",
|
|
20
|
+
"schema/*.json"
|
|
21
|
+
],
|
|
22
|
+
"main": "lib/index.js",
|
|
23
|
+
"types": "lib/index.d.ts",
|
|
24
|
+
"style": "style/index.css",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/jupyterlite/ai.git",
|
|
28
|
+
"directory": "packages/ai"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "echo 'Building @jupyterlite/ai' && jlpm build:lib && jlpm build:labextension:dev",
|
|
32
|
+
"build:dev": "echo 'Building @jupyterlite/ai' && jlpm build:lib && jlpm build:labextension:dev",
|
|
33
|
+
"build:prod": "echo 'Building @jupyterlite/ai' && jlpm clean && jlpm build:lib:prod && jlpm build:labextension",
|
|
34
|
+
"build:labextension": "jupyter labextension build .",
|
|
35
|
+
"build:labextension:dev": "jupyter labextension build --development True .",
|
|
36
|
+
"build:lib": "tsc --sourceMap",
|
|
37
|
+
"build:lib:prod": "tsc",
|
|
38
|
+
"clean": "jlpm clean:lib",
|
|
39
|
+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
|
|
40
|
+
"install:extension": "jlpm build",
|
|
41
|
+
"watch": "run-p watch:src watch:labextension",
|
|
42
|
+
"watch:src": "tsc -w --sourceMap",
|
|
43
|
+
"watch:labextension": "jupyter labextension watch ."
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@jupyter/chat": "^0.21.1",
|
|
47
|
+
"@jupyter/ydoc": "^3.1.0",
|
|
48
|
+
"@jupyterlab/application": "^4.5.8",
|
|
49
|
+
"@jupyterlab/apputils": "^4.6.8",
|
|
50
|
+
"@jupyterlab/completer": "^4.5.8",
|
|
51
|
+
"@jupyterlab/coreutils": "^6.5.8",
|
|
52
|
+
"@jupyterlab/docmanager": "^4.5.8",
|
|
53
|
+
"@jupyterlab/docregistry": "^4.5.8",
|
|
54
|
+
"@jupyterlab/filebrowser": "^4.5.8",
|
|
55
|
+
"@jupyterlab/nbformat": "^4.5.8",
|
|
56
|
+
"@jupyterlab/notebook": "^4.5.8",
|
|
57
|
+
"@jupyterlab/rendermime": "^4.5.8",
|
|
58
|
+
"@jupyterlab/services": "^7.5.8",
|
|
59
|
+
"@jupyterlab/settingregistry": "^4.5.8",
|
|
60
|
+
"@jupyterlab/statusbar": "^4.5.8",
|
|
61
|
+
"@jupyterlab/translation": "^4.5.8",
|
|
62
|
+
"@jupyterlab/ui-components": "^4.5.8",
|
|
63
|
+
"@jupyternaut/agent": "^0.19.0",
|
|
64
|
+
"@lumino/commands": "^2.3.2",
|
|
65
|
+
"@lumino/coreutils": "^2.2.1",
|
|
66
|
+
"@lumino/disposable": "^2.1.4",
|
|
67
|
+
"@lumino/polling": "^2.1.4",
|
|
68
|
+
"@lumino/signaling": "^2.1.4",
|
|
69
|
+
"@lumino/widgets": "^2.7.1",
|
|
70
|
+
"@mui/icons-material": "^7",
|
|
71
|
+
"@mui/material": "^7",
|
|
72
|
+
"ai": "^6.0.116",
|
|
73
|
+
"jupyter-chat-components": "^0.6.0",
|
|
74
|
+
"jupyter-secrets-manager": "^0.5.0",
|
|
75
|
+
"react": "^18.3.1",
|
|
76
|
+
"yaml": "^2.8.1"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@jupyterlab/builder": "^4.0.0",
|
|
80
|
+
"@jupyterlab/testutils": "^4.0.0",
|
|
81
|
+
"@types/json-schema": "^7.0.11",
|
|
82
|
+
"@types/node": "^24.3.0",
|
|
83
|
+
"@types/react": "^18.0.26",
|
|
84
|
+
"@types/react-addons-linked-state-mixin": "^0.14.22",
|
|
85
|
+
"css-loader": "^6.7.1",
|
|
86
|
+
"npm-run-all2": "^7.0.1",
|
|
87
|
+
"rimraf": "^5.0.1",
|
|
88
|
+
"source-map-loader": "^1.0.2",
|
|
89
|
+
"typescript": "~5.8.0"
|
|
90
|
+
},
|
|
91
|
+
"sideEffects": [
|
|
92
|
+
"style/*.css",
|
|
93
|
+
"style/index.js"
|
|
94
|
+
],
|
|
95
|
+
"styleModule": "style/index.js",
|
|
96
|
+
"publishConfig": {
|
|
97
|
+
"access": "public"
|
|
98
|
+
},
|
|
99
|
+
"jupyterlab": {
|
|
100
|
+
"extension": true,
|
|
101
|
+
"outputDir": "../../jupyterlite_ai/labextension",
|
|
102
|
+
"schemaDir": "schema",
|
|
103
|
+
"sharedPackages": {
|
|
104
|
+
"@jupyter/chat": {
|
|
105
|
+
"bundled": true,
|
|
106
|
+
"singleton": true
|
|
107
|
+
},
|
|
108
|
+
"jupyter-chat-components": {
|
|
109
|
+
"bundled": false,
|
|
110
|
+
"singleton": true
|
|
111
|
+
}
|
|
260
112
|
}
|
|
113
|
+
}
|
|
261
114
|
}
|
|
@@ -210,6 +210,12 @@
|
|
|
210
210
|
"type": "boolean",
|
|
211
211
|
"default": false
|
|
212
212
|
},
|
|
213
|
+
"autoTitle": {
|
|
214
|
+
"title": "Auto Title",
|
|
215
|
+
"description": "Automatically request a title from the model for every message until there are 5 messages",
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"default": false
|
|
218
|
+
},
|
|
213
219
|
"showTokenUsage": {
|
|
214
220
|
"title": "Show Token Usage",
|
|
215
221
|
"description": "Display token usage information in the chat toolbar",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { ISkillRegistry } from '@jupyternaut/agent';
|
|
1
2
|
import { ChatCommand, IChatCommandProvider, IInputModel } from '@jupyter/chat';
|
|
2
|
-
|
|
3
3
|
import { CommandRegistry } from '@lumino/commands';
|
|
4
4
|
|
|
5
5
|
import { AIChatModel } from '../chat-model';
|
|
6
|
-
import { CommandIds
|
|
6
|
+
import { CommandIds } from '../tokens';
|
|
7
7
|
|
|
8
8
|
export class SkillsCommandProvider implements IChatCommandProvider {
|
|
9
9
|
constructor(options: SkillsCommandProvider.IOptions) {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IAgentManagerFactory,
|
|
3
|
+
IProviderRegistry,
|
|
4
|
+
IToolRegistry
|
|
5
|
+
} from '@jupyternaut/agent';
|
|
1
6
|
import { ActiveCellManager } from '@jupyter/chat';
|
|
2
7
|
import { IDocumentManager } from '@jupyterlab/docmanager';
|
|
3
8
|
import { IRenderMimeRegistry } from '@jupyterlab/rendermime';
|
|
@@ -5,12 +10,10 @@ import { Contents } from '@jupyterlab/services';
|
|
|
5
10
|
|
|
6
11
|
import { AIChatModel } from './chat-model';
|
|
7
12
|
import type {
|
|
8
|
-
|
|
13
|
+
IAIChatModel,
|
|
9
14
|
IAISettingsModel,
|
|
10
15
|
IChatModelHandler,
|
|
11
|
-
ICreateChatOptions
|
|
12
|
-
IProviderRegistry,
|
|
13
|
-
IToolRegistry
|
|
16
|
+
ICreateChatOptions
|
|
14
17
|
} from './tokens';
|
|
15
18
|
|
|
16
19
|
/**
|
|
@@ -28,7 +31,7 @@ export class ChatModelHandler implements IChatModelHandler {
|
|
|
28
31
|
this._contentsManager = options.contentsManager;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
createModel(options: ICreateChatOptions):
|
|
34
|
+
createModel(options: ICreateChatOptions): IAIChatModel {
|
|
32
35
|
const { name, activeProvider, tokenUsage, messages, autosave, title } =
|
|
33
36
|
options;
|
|
34
37
|
|
|
@@ -49,7 +52,8 @@ export class ChatModelHandler implements IChatModelHandler {
|
|
|
49
52
|
agentManager,
|
|
50
53
|
activeCellManager: this._activeCellManager,
|
|
51
54
|
documentManager: this._docManager,
|
|
52
|
-
contentsManager: this._contentsManager
|
|
55
|
+
contentsManager: this._contentsManager,
|
|
56
|
+
providerRegistry: this._providerRegistry
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
messages?.forEach(message => {
|