@jupyterlite/ai 0.8.1 → 0.9.0-a0

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.
Files changed (162) hide show
  1. package/lib/agent.d.ts +233 -0
  2. package/lib/agent.js +604 -0
  3. package/lib/chat-model.d.ts +195 -0
  4. package/lib/chat-model.js +590 -0
  5. package/lib/completion/completion-provider.d.ts +83 -0
  6. package/lib/completion/completion-provider.js +209 -0
  7. package/lib/completion/index.d.ts +1 -0
  8. package/lib/completion/index.js +1 -0
  9. package/lib/components/clear-button.d.ts +18 -0
  10. package/lib/components/clear-button.js +31 -0
  11. package/lib/components/index.d.ts +3 -0
  12. package/lib/components/index.js +3 -0
  13. package/lib/components/model-select.d.ts +19 -0
  14. package/lib/components/model-select.js +154 -0
  15. package/lib/components/stop-button.d.ts +3 -3
  16. package/lib/components/stop-button.js +8 -9
  17. package/lib/components/token-usage-display.d.ts +45 -0
  18. package/lib/components/token-usage-display.js +74 -0
  19. package/lib/components/tool-select.d.ts +27 -0
  20. package/lib/components/tool-select.js +130 -0
  21. package/lib/icons.d.ts +3 -1
  22. package/lib/icons.js +10 -13
  23. package/lib/index.d.ts +4 -5
  24. package/lib/index.js +322 -167
  25. package/lib/mcp/browser.d.ts +68 -0
  26. package/lib/mcp/browser.js +132 -0
  27. package/lib/models/settings-model.d.ts +69 -0
  28. package/lib/models/settings-model.js +295 -0
  29. package/lib/providers/built-in-providers.d.ts +9 -0
  30. package/lib/providers/built-in-providers.js +192 -0
  31. package/lib/providers/models.d.ts +37 -0
  32. package/lib/providers/models.js +28 -0
  33. package/lib/providers/provider-registry.d.ts +94 -0
  34. package/lib/providers/provider-registry.js +155 -0
  35. package/lib/tokens.d.ts +157 -86
  36. package/lib/tokens.js +16 -12
  37. package/lib/tools/commands.d.ts +11 -0
  38. package/lib/tools/commands.js +126 -0
  39. package/lib/tools/file.d.ts +27 -0
  40. package/lib/tools/file.js +262 -0
  41. package/lib/tools/notebook.d.ts +40 -0
  42. package/lib/tools/notebook.js +762 -0
  43. package/lib/tools/tool-registry.d.ts +35 -0
  44. package/lib/tools/tool-registry.js +55 -0
  45. package/lib/widgets/ai-settings.d.ts +39 -0
  46. package/lib/widgets/ai-settings.js +506 -0
  47. package/lib/widgets/chat-wrapper.d.ts +144 -0
  48. package/lib/widgets/chat-wrapper.js +390 -0
  49. package/lib/widgets/provider-config-dialog.d.ts +13 -0
  50. package/lib/widgets/provider-config-dialog.js +104 -0
  51. package/package.json +150 -41
  52. package/schema/settings-model.json +153 -0
  53. package/src/agent.ts +800 -0
  54. package/src/chat-model.ts +770 -0
  55. package/src/completion/completion-provider.ts +308 -0
  56. package/src/completion/index.ts +1 -0
  57. package/src/components/clear-button.tsx +56 -0
  58. package/src/components/index.ts +3 -0
  59. package/src/components/model-select.tsx +245 -0
  60. package/src/components/stop-button.tsx +11 -11
  61. package/src/components/token-usage-display.tsx +130 -0
  62. package/src/components/tool-select.tsx +218 -0
  63. package/src/icons.ts +12 -14
  64. package/src/index.ts +468 -238
  65. package/src/mcp/browser.ts +213 -0
  66. package/src/models/settings-model.ts +409 -0
  67. package/src/providers/built-in-providers.ts +216 -0
  68. package/src/providers/models.ts +79 -0
  69. package/src/providers/provider-registry.ts +189 -0
  70. package/src/tokens.ts +203 -90
  71. package/src/tools/commands.ts +151 -0
  72. package/src/tools/file.ts +307 -0
  73. package/src/tools/notebook.ts +964 -0
  74. package/src/tools/tool-registry.ts +63 -0
  75. package/src/types.d.ts +4 -0
  76. package/src/widgets/ai-settings.tsx +1100 -0
  77. package/src/widgets/chat-wrapper.tsx +543 -0
  78. package/src/widgets/provider-config-dialog.tsx +256 -0
  79. package/style/base.css +335 -14
  80. package/style/icons/jupyternaut-lite.svg +1 -1
  81. package/lib/base-completer.d.ts +0 -49
  82. package/lib/base-completer.js +0 -14
  83. package/lib/chat-handler.d.ts +0 -56
  84. package/lib/chat-handler.js +0 -201
  85. package/lib/completion-provider.d.ts +0 -34
  86. package/lib/completion-provider.js +0 -32
  87. package/lib/default-prompts.d.ts +0 -2
  88. package/lib/default-prompts.js +0 -31
  89. package/lib/default-providers/Anthropic/completer.d.ts +0 -12
  90. package/lib/default-providers/Anthropic/completer.js +0 -46
  91. package/lib/default-providers/Anthropic/settings-schema.json +0 -70
  92. package/lib/default-providers/ChromeAI/completer.d.ts +0 -12
  93. package/lib/default-providers/ChromeAI/completer.js +0 -56
  94. package/lib/default-providers/ChromeAI/instructions.d.ts +0 -6
  95. package/lib/default-providers/ChromeAI/instructions.js +0 -42
  96. package/lib/default-providers/ChromeAI/settings-schema.json +0 -18
  97. package/lib/default-providers/Gemini/completer.d.ts +0 -12
  98. package/lib/default-providers/Gemini/completer.js +0 -48
  99. package/lib/default-providers/Gemini/instructions.d.ts +0 -2
  100. package/lib/default-providers/Gemini/instructions.js +0 -9
  101. package/lib/default-providers/Gemini/settings-schema.json +0 -64
  102. package/lib/default-providers/MistralAI/completer.d.ts +0 -13
  103. package/lib/default-providers/MistralAI/completer.js +0 -52
  104. package/lib/default-providers/MistralAI/instructions.d.ts +0 -2
  105. package/lib/default-providers/MistralAI/instructions.js +0 -18
  106. package/lib/default-providers/MistralAI/settings-schema.json +0 -75
  107. package/lib/default-providers/Ollama/completer.d.ts +0 -12
  108. package/lib/default-providers/Ollama/completer.js +0 -43
  109. package/lib/default-providers/Ollama/instructions.d.ts +0 -2
  110. package/lib/default-providers/Ollama/instructions.js +0 -70
  111. package/lib/default-providers/Ollama/settings-schema.json +0 -143
  112. package/lib/default-providers/OpenAI/completer.d.ts +0 -12
  113. package/lib/default-providers/OpenAI/completer.js +0 -43
  114. package/lib/default-providers/OpenAI/settings-schema.json +0 -628
  115. package/lib/default-providers/WebLLM/completer.d.ts +0 -21
  116. package/lib/default-providers/WebLLM/completer.js +0 -127
  117. package/lib/default-providers/WebLLM/instructions.d.ts +0 -6
  118. package/lib/default-providers/WebLLM/instructions.js +0 -32
  119. package/lib/default-providers/WebLLM/settings-schema.json +0 -19
  120. package/lib/default-providers/index.d.ts +0 -2
  121. package/lib/default-providers/index.js +0 -179
  122. package/lib/provider.d.ts +0 -144
  123. package/lib/provider.js +0 -412
  124. package/lib/settings/base.json +0 -7
  125. package/lib/settings/index.d.ts +0 -3
  126. package/lib/settings/index.js +0 -3
  127. package/lib/settings/panel.d.ts +0 -226
  128. package/lib/settings/panel.js +0 -510
  129. package/lib/settings/textarea.d.ts +0 -2
  130. package/lib/settings/textarea.js +0 -18
  131. package/lib/settings/utils.d.ts +0 -2
  132. package/lib/settings/utils.js +0 -4
  133. package/lib/types/ai-model.d.ts +0 -24
  134. package/lib/types/ai-model.js +0 -5
  135. package/schema/chat.json +0 -28
  136. package/schema/provider-registry.json +0 -29
  137. package/schema/system-prompts.json +0 -22
  138. package/src/base-completer.ts +0 -75
  139. package/src/chat-handler.ts +0 -262
  140. package/src/completion-provider.ts +0 -64
  141. package/src/default-prompts.ts +0 -33
  142. package/src/default-providers/Anthropic/completer.ts +0 -59
  143. package/src/default-providers/ChromeAI/completer.ts +0 -73
  144. package/src/default-providers/ChromeAI/instructions.ts +0 -45
  145. package/src/default-providers/Gemini/completer.ts +0 -61
  146. package/src/default-providers/Gemini/instructions.ts +0 -9
  147. package/src/default-providers/MistralAI/completer.ts +0 -69
  148. package/src/default-providers/MistralAI/instructions.ts +0 -18
  149. package/src/default-providers/Ollama/completer.ts +0 -54
  150. package/src/default-providers/Ollama/instructions.ts +0 -70
  151. package/src/default-providers/OpenAI/completer.ts +0 -54
  152. package/src/default-providers/WebLLM/completer.ts +0 -151
  153. package/src/default-providers/WebLLM/instructions.ts +0 -33
  154. package/src/default-providers/index.ts +0 -211
  155. package/src/global.d.ts +0 -9
  156. package/src/provider.ts +0 -514
  157. package/src/settings/index.ts +0 -3
  158. package/src/settings/panel.tsx +0 -773
  159. package/src/settings/textarea.tsx +0 -33
  160. package/src/settings/utils.ts +0 -5
  161. package/src/types/ai-model.ts +0 -37
  162. package/src/types/service-worker.d.ts +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlite/ai",
3
- "version": "0.8.1",
3
+ "version": "0.9.0-a0",
4
4
  "description": "AI code completions and chat for JupyterLite",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -47,8 +47,6 @@
47
47
  "prettier": "jlpm prettier:base --write --list-different",
48
48
  "prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"",
49
49
  "prettier:check": "jlpm prettier:base --check",
50
- "settings:build": "node ./scripts/settings-checker.js --generate",
51
- "settings:check": "node ./scripts/settings-checker.js",
52
50
  "stylelint": "jlpm stylelint:check --fix",
53
51
  "stylelint:check": "stylelint --cache \"style/**/*.css\"",
54
52
  "watch": "run-p watch:src watch:labextension",
@@ -56,53 +54,50 @@
56
54
  "watch:labextension": "jupyter labextension watch ."
57
55
  },
58
56
  "dependencies": {
59
- "@jupyter/chat": "^0.14.0",
60
- "@jupyterlab/application": "^4.4.0",
61
- "@jupyterlab/apputils": "^4.5.0",
62
- "@jupyterlab/completer": "^4.4.0",
63
- "@jupyterlab/coreutils": "^6.4.0",
64
- "@jupyterlab/notebook": "^4.4.0",
65
- "@jupyterlab/rendermime": "^4.4.0",
66
- "@jupyterlab/settingregistry": "^4.4.0",
67
- "@jupyterlab/ui-components": "^4.4.0",
68
- "@langchain/anthropic": "^0.3.24",
69
- "@langchain/community": "^0.3.48",
70
- "@langchain/core": "^0.3.62",
71
- "@langchain/google-genai": "^0.2.14",
72
- "@langchain/mistralai": "^0.2.1",
73
- "@langchain/ollama": "^0.2.3",
74
- "@langchain/openai": "^0.5.16",
75
- "@lumino/coreutils": "^2.1.2",
76
- "@lumino/polling": "^2.1.2",
77
- "@lumino/signaling": "^2.1.2",
78
- "@mlc-ai/web-llm": "^0.2.79",
79
- "@mlc-ai/web-runtime": "^0.18.0-dev2",
80
- "@mlc-ai/web-tokenizers": "^0.1.6",
81
- "@mui/icons-material": "^5.11.0",
82
- "@mui/material": "^5.11.0",
83
- "@rjsf/core": "^5.18.4",
84
- "@rjsf/utils": "^5.18.4",
85
- "@rjsf/validator-ajv8": "^5.18.4",
86
- "json5": "^2.2.3",
87
- "jupyter-secrets-manager": "^0.4.0",
88
- "react": "^18.2.0",
89
- "react-dom": "^18.2.0"
57
+ "@ai-sdk/anthropic": "^2.0.17",
58
+ "@ai-sdk/mistral": "^2.0.14",
59
+ "@jupyter/chat": "^0.17.0",
60
+ "@jupyterlab/application": "^4.0.0",
61
+ "@jupyterlab/apputils": "^4.5.6",
62
+ "@jupyterlab/cells": "^4.4.6",
63
+ "@jupyterlab/completer": "^4.0.0",
64
+ "@jupyterlab/coreutils": "^6.4.6",
65
+ "@jupyterlab/docmanager": "^4.4.6",
66
+ "@jupyterlab/docregistry": "^4.4.6",
67
+ "@jupyterlab/fileeditor": "^4.4.6",
68
+ "@jupyterlab/notebook": "^4.4.6",
69
+ "@jupyterlab/rendermime": "^4.4.6",
70
+ "@jupyterlab/services": "^7.4.6",
71
+ "@jupyterlab/settingregistry": "^4.0.0",
72
+ "@jupyterlab/ui-components": "^4.4.6",
73
+ "@lumino/commands": "^2.3.2",
74
+ "@lumino/coreutils": "^2.2.1",
75
+ "@lumino/messaging": "^2.0.3",
76
+ "@lumino/signaling": "^2.1.4",
77
+ "@lumino/widgets": "^2.7.1",
78
+ "@modelcontextprotocol/sdk": "^1.17.4",
79
+ "@mui/icons-material": "^5",
80
+ "@mui/material": "^5",
81
+ "@openai/agents": "^0.1.2",
82
+ "@openai/agents-extensions": "^0.1.2",
83
+ "ai": "^5.0.44",
84
+ "ollama-ai-provider-v2": "^1.3.1",
85
+ "zod": "^3.25.76"
90
86
  },
91
87
  "devDependencies": {
92
- "@jupyterlab/builder": "^4.4.0",
93
- "@stylistic/eslint-plugin": "^3.0.1",
94
- "@types/chrome": "^0.0.304",
88
+ "@jupyterlab/builder": "^4.0.0",
89
+ "@jupyterlab/testutils": "^4.0.0",
95
90
  "@types/json-schema": "^7.0.11",
91
+ "@types/node": "^24.3.0",
96
92
  "@types/react": "^18.0.26",
97
93
  "@types/react-addons-linked-state-mixin": "^0.14.22",
98
94
  "@typescript-eslint/eslint-plugin": "^6.1.0",
99
95
  "@typescript-eslint/parser": "^6.1.0",
100
- "@webgpu/types": "^0.1.54",
101
96
  "css-loader": "^6.7.1",
102
97
  "eslint": "^8.36.0",
103
98
  "eslint-config-prettier": "^8.8.0",
104
99
  "eslint-plugin-prettier": "^5.0.0",
105
- "npm-run-all": "^4.1.5",
100
+ "npm-run-all2": "^7.0.1",
106
101
  "prettier": "^3.0.0",
107
102
  "rimraf": "^5.0.1",
108
103
  "source-map-loader": "^1.0.2",
@@ -112,8 +107,7 @@
112
107
  "stylelint-config-standard": "^34.0.0",
113
108
  "stylelint-csstree-validator": "^3.0.0",
114
109
  "stylelint-prettier": "^4.0.0",
115
- "ts-json-schema-generator": "^2.4.0",
116
- "typescript": "~5.8.3",
110
+ "typescript": "~5.8.0",
117
111
  "yjs": "^13.5.0"
118
112
  },
119
113
  "sideEffects": [
@@ -128,5 +122,120 @@
128
122
  "extension": true,
129
123
  "outputDir": "jupyterlite_ai/labextension",
130
124
  "schemaDir": "schema"
125
+ },
126
+ "eslintIgnore": [
127
+ "node_modules",
128
+ "dist",
129
+ "coverage",
130
+ "**/*.d.ts",
131
+ "tests",
132
+ "**/__tests__",
133
+ "ui-tests",
134
+ ".venv",
135
+ "webpack.config.js"
136
+ ],
137
+ "eslintConfig": {
138
+ "extends": [
139
+ "eslint:recommended",
140
+ "plugin:@typescript-eslint/eslint-recommended",
141
+ "plugin:@typescript-eslint/recommended",
142
+ "plugin:prettier/recommended"
143
+ ],
144
+ "parser": "@typescript-eslint/parser",
145
+ "parserOptions": {
146
+ "project": "tsconfig.json",
147
+ "sourceType": "module"
148
+ },
149
+ "plugins": [
150
+ "@typescript-eslint"
151
+ ],
152
+ "rules": {
153
+ "@typescript-eslint/naming-convention": [
154
+ "error",
155
+ {
156
+ "selector": "interface",
157
+ "format": [
158
+ "PascalCase"
159
+ ],
160
+ "custom": {
161
+ "regex": "^I[A-Z]",
162
+ "match": true
163
+ }
164
+ }
165
+ ],
166
+ "@typescript-eslint/no-unused-vars": [
167
+ "warn",
168
+ {
169
+ "args": "none"
170
+ }
171
+ ],
172
+ "@typescript-eslint/no-explicit-any": "off",
173
+ "@typescript-eslint/no-namespace": "off",
174
+ "@typescript-eslint/no-use-before-define": "off",
175
+ "@typescript-eslint/quotes": [
176
+ "error",
177
+ "single",
178
+ {
179
+ "avoidEscape": true,
180
+ "allowTemplateLiterals": false
181
+ }
182
+ ],
183
+ "curly": [
184
+ "error",
185
+ "all"
186
+ ],
187
+ "eqeqeq": "error",
188
+ "prefer-arrow-callback": "error",
189
+ "no-restricted-imports": [
190
+ "error",
191
+ {
192
+ "paths": [
193
+ {
194
+ "name": "@mui/icons-material",
195
+ "message": "Please import icons using path imports, e.g. `import AddIcon from '@mui/icons-material/Add'`"
196
+ }
197
+ ],
198
+ "patterns": [
199
+ {
200
+ "group": [
201
+ "@mui/*/*/*"
202
+ ],
203
+ "message": "3rd level imports in mui are considered private"
204
+ }
205
+ ]
206
+ }
207
+ ]
208
+ }
209
+ },
210
+ "prettier": {
211
+ "singleQuote": true,
212
+ "trailingComma": "none",
213
+ "arrowParens": "avoid",
214
+ "endOfLine": "auto",
215
+ "overrides": [
216
+ {
217
+ "files": "package.json",
218
+ "options": {
219
+ "tabWidth": 4
220
+ }
221
+ }
222
+ ]
223
+ },
224
+ "stylelint": {
225
+ "extends": [
226
+ "stylelint-config-recommended",
227
+ "stylelint-config-standard",
228
+ "stylelint-prettier/recommended"
229
+ ],
230
+ "plugins": [
231
+ "stylelint-csstree-validator"
232
+ ],
233
+ "rules": {
234
+ "csstree/validator": true,
235
+ "property-no-vendor-prefix": null,
236
+ "selector-class-pattern": "^([a-z][A-z\\d]*)(-[A-z\\d]+)*$|^Mui[A-Z]",
237
+ "selector-no-vendor-prefix": null,
238
+ "value-no-vendor-prefix": null
239
+ }
131
240
  }
132
241
  }
@@ -0,0 +1,153 @@
1
+ {
2
+ "jupyter.lab.shortcuts": [],
3
+ "title": "JupyterLite AI Settings",
4
+ "description": "Configuration for JupyterLite AI extension providers, models, and behavior",
5
+ "type": "object",
6
+ "properties": {
7
+ "providers": {
8
+ "title": "AI Providers",
9
+ "description": "List of configured AI providers",
10
+ "type": "array",
11
+ "items": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": { "type": "string" },
15
+ "name": { "type": "string" },
16
+ "provider": {
17
+ "type": "string",
18
+ "description": "Provider identifier"
19
+ },
20
+ "model": { "type": "string" },
21
+ "apiKey": { "type": "string" },
22
+ "baseURL": { "type": "string" },
23
+ "headers": {
24
+ "type": "object",
25
+ "additionalProperties": { "type": "string" }
26
+ },
27
+ "customSettings": {
28
+ "type": "object",
29
+ "additionalProperties": true
30
+ }
31
+ },
32
+ "required": ["id", "name", "provider", "model"],
33
+ "additionalProperties": true
34
+ },
35
+ "default": []
36
+ },
37
+ "activeProvider": {
38
+ "title": "Active Chat Provider",
39
+ "description": "ID of the provider to use for chat",
40
+ "type": "string",
41
+ "default": ""
42
+ },
43
+ "activeCompleterProvider": {
44
+ "title": "Active Completion Provider",
45
+ "description": "ID of the provider to use for completions (if different from chat)",
46
+ "type": "string"
47
+ },
48
+ "useSameProviderForChatAndCompleter": {
49
+ "title": "Use Same Provider",
50
+ "description": "Use the same provider for both chat and completions",
51
+ "type": "boolean",
52
+ "default": true
53
+ },
54
+ "mcpServers": {
55
+ "title": "MCP Servers",
56
+ "description": "Model Context Protocol servers configuration",
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "properties": {
61
+ "id": { "type": "string" },
62
+ "name": { "type": "string" },
63
+ "url": { "type": "string" },
64
+ "enabled": { "type": "boolean" }
65
+ },
66
+ "required": ["id", "name", "url", "enabled"],
67
+ "additionalProperties": true
68
+ },
69
+ "default": []
70
+ },
71
+ "temperature": {
72
+ "title": "Temperature",
73
+ "description": "Controls response creativity (0.0 = deterministic, 2.0 = very creative)",
74
+ "type": "number",
75
+ "minimum": 0,
76
+ "maximum": 2,
77
+ "default": 0.7
78
+ },
79
+ "maxTokens": {
80
+ "title": "Max Tokens",
81
+ "description": "Maximum length of AI responses (leave empty for provider default)",
82
+ "type": "number",
83
+ "minimum": 1,
84
+ "maximum": 8192
85
+ },
86
+ "contextAwareness": {
87
+ "title": "Context Awareness",
88
+ "description": "Enable context-aware responses",
89
+ "type": "boolean",
90
+ "default": true
91
+ },
92
+ "codeExecution": {
93
+ "title": "Code Execution",
94
+ "description": "Enable code execution capabilities",
95
+ "type": "boolean",
96
+ "default": false
97
+ },
98
+ "toolsEnabled": {
99
+ "title": "Tools Enabled",
100
+ "description": "Allow AI to use tools like notebook operations and file management",
101
+ "type": "boolean",
102
+ "default": true
103
+ },
104
+ "sendWithShiftEnter": {
105
+ "title": "Send with Shift+Enter",
106
+ "description": "Use Shift+Enter to send messages (Enter creates new line)",
107
+ "type": "boolean",
108
+ "default": false
109
+ },
110
+ "maxTurns": {
111
+ "title": "Max Turns",
112
+ "description": "Maximum number of tool execution turns",
113
+ "type": "number",
114
+ "minimum": 1,
115
+ "maximum": 100,
116
+ "default": 25
117
+ },
118
+ "showTokenUsage": {
119
+ "title": "Show Token Usage",
120
+ "description": "Display token usage information in the chat toolbar",
121
+ "type": "boolean",
122
+ "default": false
123
+ },
124
+ "commandsRequiringApproval": {
125
+ "title": "Commands Requiring Approval",
126
+ "description": "List of commands that require user approval before AI can execute them",
127
+ "type": "array",
128
+ "items": { "type": "string" },
129
+ "default": [
130
+ "notebook:restart-run-all",
131
+ "notebook:run-cell",
132
+ "notebook:run-cell-and-select-next",
133
+ "notebook:run-cell-and-insert-below",
134
+ "notebook:run-all-cells",
135
+ "notebook:run-all-above",
136
+ "notebook:run-all-below",
137
+ "console:execute",
138
+ "console:execute-forced",
139
+ "fileeditor:run-code",
140
+ "kernelmenu:run",
141
+ "kernelmenu:restart-and-run-all",
142
+ "runmenu:run-all"
143
+ ]
144
+ },
145
+ "systemPrompt": {
146
+ "title": "System Prompt",
147
+ "description": "Instructions that define how the AI should behave and respond",
148
+ "type": "string",
149
+ "default": "You are Jupyternaut, an AI coding assistant built specifically for the JupyterLab environment.\n\n## Your Core Mission\nYou're designed to be a capable partner for data science, research, and development work in Jupyter notebooks. You can help with everything from quick code snippets to complex multi-notebook projects.\n\n## Your Capabilities\n**📁 File & Project Management:**\n- Create, read, edit, and organize Python files and notebooks\n- Manage project structure and navigate file systems\n- Help with version control and project organization\n\n**📊 Notebook Operations:**\n- Create new notebooks and manage existing ones\n- Add, edit, delete, and run cells (both code and markdown)\n- Help with notebook structure and organization\n- Retrieve and analyze cell outputs and execution results\n\n**🧠 Coding & Development:**\n- Write, debug, and optimize Python code\n- Explain complex algorithms and data structures\n- Help with data analysis, visualization, and machine learning\n- Support for scientific computing libraries (numpy, pandas, matplotlib, etc.)\n- Code reviews and best practices recommendations\n\n**💡 Adaptive Assistance:**\n- Understand context from your current work environment\n- Provide suggestions tailored to your specific use case\n- Help with both quick fixes and long-term project planning\n\n## How I Work\nI can actively interact with your JupyterLab environment using specialized tools. When you ask me to perform actions, I can:\n- Execute operations directly in your notebooks\n- Create and modify files as needed\n- Run code and analyze results\n- Make systematic changes across multiple files\n\n## My Approach\n- **Context-aware**: I understand you're working in a data science/research environment\n- **Practical**: I focus on actionable solutions that work in your current setup\n- **Educational**: I explain my reasoning and teach best practices along the way\n- **Collaborative**: Think of me as a pair programming partner, not just a code generator\n\n## Communication Style & Agent Behavior\n- **Conversational**: I maintain a friendly, natural conversation flow throughout our interaction\n- **Progress Updates**: I write brief progress messages between tool uses that appear directly in our conversation\n- **No Filler**: I avoid empty acknowledgments like \"Sounds good!\" or \"Okay, I will...\" - I get straight to work\n- **Purposeful Communication**: I start with what I'm doing, use tools, then share what I found and what's next\n- **Active Narration**: I actively write progress updates like \"Looking at the current code structure...\" or \"Found the issue in the notebook...\" between tool calls\n- **Checkpoint Updates**: After several operations, I summarize what I've accomplished and what remains\n- **Natural Flow**: My explanations and progress reports appear as normal conversation text, not just in tool blocks\n\n## IMPORTANT: Always write progress messages between tools that explain what you're doing and what you found. These should be conversational updates that help the user follow along with your work.\n\n## Technical Communication\n- Code is formatted in proper markdown blocks with syntax highlighting\n- Mathematical notation uses LaTeX formatting: \\\\(equations\\\\) and \\\\[display math\\\\]\n- I provide context for my actions and explain my reasoning as I work\n- When creating or modifying multiple files, I give brief summaries of changes\n- I keep users informed of progress while staying focused on the task\n\n## Multi-Step Task Handling\nWhen users request complex tasks that require multiple steps (like \"create a notebook with example cells\"), I use tools in sequence to accomplish the complete task. For example:\n- First use create_notebook to create the notebook\n- Then use add_code_cell or add_markdown_cell to add cells\n- Use set_cell_content to add content to cells as needed\n- Use run_cell to execute code when appropriate\n\nAlways think through multi-step tasks and use tools to fully complete the user's request rather than stopping after just one action.\n\nReady to help you build something great! What are you working on?"
150
+ }
151
+ },
152
+ "additionalProperties": false
153
+ }