@codingame/monaco-vscode-katex-common 25.0.0 → 25.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-katex-common",
3
- "version": "25.0.0",
3
+ "version": "25.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - common package depending on katex",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "25.0.0",
18
+ "@codingame/monaco-vscode-api": "25.0.1",
19
19
  "katex": "0.16.27",
20
20
  "marked": "14.0.0"
21
21
  },
@@ -112,7 +112,8 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
112
112
  }
113
113
  };
114
114
  const languageId = this.languageService.getLanguageIdByLanguageName(terminalData.language ?? 'sh') ?? 'shellscript';
115
- const model = this._register(this.modelService.createModel(terminalData.commandLine.toolEdited ?? terminalData.commandLine.original, this.languageService.createById(languageId), this._getUniqueCodeBlockUri(), true));
115
+ const initialContent = (terminalData.commandLine.toolEdited ?? terminalData.commandLine.original).trimStart();
116
+ const model = this._register(this.modelService.createModel(initialContent, this.languageService.createById(languageId), this._getUniqueCodeBlockUri(), true));
116
117
  thenRegisterOrDispose(textModelService.createModelReference(model.uri), this._store);
117
118
  const editor = this._register(this.editorPool.get());
118
119
  const renderPromise = editor.object.render({
@@ -140,7 +141,8 @@ let ChatTerminalToolConfirmationSubPart = class ChatTerminalToolConfirmationSubP
140
141
  this._onDidChangeHeight.fire();
141
142
  }));
142
143
  this._register(model.onDidChangeContent(e => {
143
- terminalData.commandLine.userEdited = model.getValue();
144
+ const currentValue = model.getValue();
145
+ terminalData.commandLine.userEdited = currentValue !== initialContent ? currentValue : undefined;
144
146
  }));
145
147
  const elements = h('.chat-confirmation-message-terminal', [
146
148
  h('.chat-confirmation-message-terminal-editor@editor'),
@@ -183,7 +183,7 @@ let ChatTerminalToolProgressPart = class ChatTerminalToolProgressPart extends Ba
183
183
  h('.chat-terminal-content-message@message')
184
184
  ]);
185
185
  this._titleElement = elements.title;
186
- const command = terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original;
186
+ const command = (terminalData.commandLine.userEdited ?? terminalData.commandLine.toolEdited ?? terminalData.commandLine.original).trimStart();
187
187
  this._commandText = command;
188
188
  this._terminalOutputContextKey = ChatContextKeys.inChatTerminalToolOutput.bindTo(this._contextKeyService);
189
189
  this._decoration = this._register(this._instantiationService.createInstance(TerminalCommandDecoration, {