Skip to content

Commit a71b340

Browse files
kaisalmenCGNonofr
authored andcommitted
Added missing service started vscode_monaco_upgrade guide
1 parent 8c69855 commit a71b340

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

docs/vscode_monaco_upgrade.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# How to upgrade to next vscode and monaco-editor version
2+
3+
## Preparation
4+
5+
- Get the new vscode commit from the new monaco-editor release version (in the package.json there is a `vscodeRef` field)
6+
- Open the vscode repo, reset to the previous vscodeRef commit
7+
- Apply the current patch: `patch -p1 < /path/to/monaco-vscode-api/scripts/vscode.patch`
8+
- `git stash`
9+
- checkout new vscodeRef commit
10+
- `git stash pop`
11+
- resolve conflicts, update code...
12+
- generate new patch: `git diff --staged > /path/to/monaco-vscode-api/scripts/vscode.patch`
13+
14+
## the monaco-vscode-api side
15+
16+
- update monaco-editor (and other dependencies) and update to the new `vscodeRef`
17+
- wait for the new vscode version to be downloaded and built
18+
- Fix errors, adapt code, build, include the `vscode.patch` into this commit
19+
- update demo
20+
21+
## Further points (needs polishing / ne integrated properly)
22+
23+
- Do not hesitate to run the eslint autofix, it gets rid of the majority of your errors
24+
- I've just realized we need to run npx @vscode/dts dev after an update (to upate the vscode.proposed.xxx.d.ts files): it fixes the error in api.ts
25+
- The remaining errors in missing-services.ts are not hard to fix
26+
- Implement missing services (usually seem when running the demo)

src/missing-services.ts

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,14 @@ import { IEncryptionService } from 'vs/platform/encryption/common/encryptionServ
163163
import { ITestResultService } from 'vs/workbench/contrib/testing/common/testResultService'
164164
import { IDiagnosticsService, NullDiagnosticsService } from 'vs/platform/diagnostics/common/diagnostics'
165165
import { INotebookSearchService } from 'vs/workbench/contrib/search/common/notebookSearch'
166+
import { IChatProviderService } from 'vs/workbench/contrib/chat/common/chatProvider'
167+
import { IChatSlashCommandService } from 'vs/workbench/contrib/chat/common/chatSlashCommands'
168+
import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables'
169+
import { IAiRelatedInformationService } from 'vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation'
170+
import { IAiEmbeddingVectorService } from 'vs/workbench/services/aiEmbeddingVector/common/aiEmbeddingVectorService'
166171
import { ResourceSet } from 'vs/base/common/map'
167-
import { IEditorGroupView } from 'vs/workbench/browser/parts/editor/editor'
168172
import { unsupported } from './tools'
173+
import { IEditorGroupView } from 'vs/workbench/browser/parts/editor/editor'
169174

170175
class NullLoggerService extends AbstractLoggerService {
171176
constructor () {
@@ -2142,3 +2147,41 @@ registerSingleton(INotebookSearchService, class NotebookSearchService implements
21422147

21432148
_serviceBrand: undefined
21442149
}, InstantiationType.Delayed)
2150+
2151+
registerSingleton(IChatProviderService, class ChatProviderService implements IChatProviderService {
2152+
_serviceBrand: undefined
2153+
registerChatResponseProvider = unsupported
2154+
fetchChatResponse = unsupported
2155+
}, InstantiationType.Delayed)
2156+
2157+
registerSingleton(IChatSlashCommandService, class ChatSlashCommandService implements IChatSlashCommandService {
2158+
onDidChangeCommands = unsupported
2159+
registerSlashData = unsupported
2160+
registerSlashCallback = unsupported
2161+
registerSlashCommand = unsupported
2162+
executeCommand = unsupported
2163+
getCommands = unsupported
2164+
hasCommand = unsupported
2165+
_serviceBrand: undefined
2166+
}, InstantiationType.Delayed)
2167+
2168+
registerSingleton(IChatVariablesService, class ChatVariablesService implements IChatVariablesService {
2169+
registerVariable = unsupported
2170+
getVariables = unsupported
2171+
resolveVariables = unsupported
2172+
_serviceBrand: undefined
2173+
}, InstantiationType.Delayed)
2174+
2175+
registerSingleton(IAiRelatedInformationService, class AiRelatedInformationService implements IAiRelatedInformationService {
2176+
isEnabled = () => false
2177+
getRelatedInformation = unsupported
2178+
registerAiRelatedInformationProvider = unsupported
2179+
_serviceBrand: undefined
2180+
}, InstantiationType.Delayed)
2181+
2182+
registerSingleton(IAiEmbeddingVectorService, class AiEmbeddingVectorService implements IAiEmbeddingVectorService {
2183+
_serviceBrand: undefined
2184+
isEnabled = () => false
2185+
getEmbeddingVector = unsupported
2186+
registerAiEmbeddingVectorProvider = unsupported
2187+
}, InstantiationType.Delayed)

0 commit comments

Comments
 (0)