@opensumi/ide-ai-native 3.7.1 → 3.7.2-next-1739859371.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/browser/ai-core.contextkeys.d.ts +1 -0
- package/lib/browser/ai-core.contextkeys.d.ts.map +1 -1
- package/lib/browser/ai-core.contextkeys.js +1 -0
- package/lib/browser/ai-core.contextkeys.js.map +1 -1
- package/lib/browser/ai-core.contribution.d.ts +2 -1
- package/lib/browser/ai-core.contribution.d.ts.map +1 -1
- package/lib/browser/ai-core.contribution.js +60 -15
- package/lib/browser/ai-core.contribution.js.map +1 -1
- package/lib/browser/components/ChatMarkdown.d.ts.map +1 -1
- package/lib/browser/components/ChatMarkdown.js.map +1 -1
- package/lib/browser/components/WelcomeMsg.js.map +1 -1
- package/lib/browser/components/utils.d.ts +2 -2
- package/lib/browser/contrib/intelligent-completions/index.d.ts +14 -9
- package/lib/browser/contrib/intelligent-completions/index.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/index.js +6 -1
- package/lib/browser/contrib/intelligent-completions/index.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.d.ts +1 -0
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js +26 -4
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.d.ts +5 -4
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js +50 -42
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/base.d.ts +9 -3
- package/lib/browser/contrib/intelligent-completions/source/base.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/base.js +21 -3
- package/lib/browser/contrib/intelligent-completions/source/base.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.d.ts +10 -3
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.js +95 -22
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.d.ts +1 -3
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.js +13 -20
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/typing.source.d.ts +9 -0
- package/lib/browser/contrib/intelligent-completions/source/typing.source.d.ts.map +1 -0
- package/lib/browser/contrib/intelligent-completions/source/typing.source.js +36 -0
- package/lib/browser/contrib/intelligent-completions/source/typing.source.js.map +1 -0
- package/lib/browser/contrib/terminal/component/terminal-command-suggest-controller.js +2 -2
- package/lib/browser/contrib/terminal/component/terminal-command-suggest-controller.js.map +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/languages/tree-sitter/wasm-manager.d.ts.map +1 -1
- package/lib/browser/languages/tree-sitter/wasm-manager.js +14 -2
- package/lib/browser/languages/tree-sitter/wasm-manager.js.map +1 -1
- package/lib/browser/layout/ai-layout.d.ts.map +1 -1
- package/lib/browser/layout/ai-layout.js +2 -2
- package/lib/browser/layout/ai-layout.js.map +1 -1
- package/lib/browser/layout/layout.module.less +9 -9
- package/lib/browser/layout/tabbar.view.d.ts.map +1 -1
- package/lib/browser/layout/tabbar.view.js +5 -6
- package/lib/browser/layout/tabbar.view.js.map +1 -1
- package/lib/browser/model/enhanceDecorationsCollection.d.ts +14 -10
- package/lib/browser/model/enhanceDecorationsCollection.d.ts.map +1 -1
- package/lib/browser/model/enhanceDecorationsCollection.js +42 -53
- package/lib/browser/model/enhanceDecorationsCollection.js.map +1 -1
- package/lib/browser/preferences/schema.d.ts.map +1 -1
- package/lib/browser/preferences/schema.js +4 -0
- package/lib/browser/preferences/schema.js.map +1 -1
- package/lib/browser/types.d.ts +7 -2
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/types.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.d.ts +2 -1
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.js +20 -48
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.d.ts +3 -13
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.js +24 -72
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.service.d.ts +1 -6
- package/lib/browser/widget/inline-chat/inline-chat.service.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.service.js +5 -17
- package/lib/browser/widget/inline-chat/inline-chat.service.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-content-widget.d.ts +2 -5
- package/lib/browser/widget/inline-chat/inline-content-widget.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-content-widget.js +17 -42
- package/lib/browser/widget/inline-chat/inline-content-widget.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts +22 -5
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js +61 -30
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts +8 -12
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff.controller.js +68 -96
- package/lib/browser/widget/inline-diff/inline-diff.controller.js.map +1 -1
- package/lib/browser/widget/inline-hint/inline-hint.controller.d.ts +0 -1
- package/lib/browser/widget/inline-hint/inline-hint.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-hint/inline-hint.controller.js +0 -5
- package/lib/browser/widget/inline-hint/inline-hint.controller.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input-widget.d.ts +12 -2
- package/lib/browser/widget/inline-input/inline-input-widget.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input-widget.js +26 -18
- package/lib/browser/widget/inline-input/inline-input-widget.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.controller.d.ts +14 -5
- package/lib/browser/widget/inline-input/inline-input.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.controller.js +321 -165
- package/lib/browser/widget/inline-input/inline-input.controller.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.module.less +4 -0
- package/lib/browser/widget/inline-input/inline-input.service.d.ts +19 -7
- package/lib/browser/widget/inline-input/inline-input.service.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.service.js +72 -12
- package/lib/browser/widget/inline-input/inline-input.service.js.map +1 -1
- package/lib/browser/widget/inline-input/model.d.ts +34 -0
- package/lib/browser/widget/inline-input/model.d.ts.map +1 -0
- package/lib/browser/widget/inline-input/model.js +63 -0
- package/lib/browser/widget/inline-input/model.js.map +1 -0
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.d.ts +8 -19
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.js +44 -39
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.d.ts +17 -4
- package/lib/browser/widget/inline-stream-diff/live-preview.component.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.js +37 -5
- package/lib/browser/widget/inline-stream-diff/live-preview.component.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.d.ts +7 -11
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.js +33 -77
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.js.map +1 -1
- package/lib/common/utils.js +2 -2
- package/lib/common/utils.js.map +1 -1
- package/package.json +21 -21
- package/src/browser/ai-core.contextkeys.ts +3 -0
- package/src/browser/ai-core.contribution.ts +68 -17
- package/src/browser/components/ChatMarkdown.tsx +1 -1
- package/src/browser/components/WelcomeMsg.tsx +1 -1
- package/src/browser/contrib/intelligent-completions/index.ts +16 -4
- package/src/browser/contrib/intelligent-completions/intelligent-completions.contribution.ts +29 -8
- package/src/browser/contrib/intelligent-completions/intelligent-completions.controller.ts +86 -55
- package/src/browser/contrib/intelligent-completions/source/base.ts +28 -7
- package/src/browser/contrib/intelligent-completions/source/line-change.source.ts +129 -22
- package/src/browser/contrib/intelligent-completions/source/lint-error.source.ts +19 -31
- package/src/browser/contrib/intelligent-completions/source/typing.source.ts +34 -0
- package/src/browser/contrib/terminal/component/terminal-command-suggest-controller.tsx +1 -1
- package/src/browser/index.ts +2 -2
- package/src/browser/languages/tree-sitter/wasm-manager.ts +12 -2
- package/src/browser/layout/ai-layout.tsx +5 -2
- package/src/browser/layout/layout.module.less +9 -9
- package/src/browser/layout/tabbar.view.tsx +10 -8
- package/src/browser/model/enhanceDecorationsCollection.ts +62 -77
- package/src/browser/preferences/schema.ts +4 -0
- package/src/browser/types.ts +5 -3
- package/src/browser/widget/inline-chat/inline-chat-editor.controller.ts +29 -64
- package/src/browser/widget/inline-chat/inline-chat.feature.registry.ts +23 -90
- package/src/browser/widget/inline-chat/inline-chat.service.ts +2 -17
- package/src/browser/widget/inline-chat/inline-content-widget.tsx +14 -69
- package/src/browser/widget/inline-diff/inline-diff-previewer.ts +87 -32
- package/src/browser/widget/inline-diff/inline-diff.controller.ts +90 -114
- package/src/browser/widget/inline-hint/inline-hint.controller.ts +1 -7
- package/src/browser/widget/inline-input/inline-input-widget.tsx +34 -12
- package/src/browser/widget/inline-input/inline-input.controller.ts +454 -242
- package/src/browser/widget/inline-input/inline-input.module.less +4 -0
- package/src/browser/widget/inline-input/inline-input.service.ts +92 -13
- package/src/browser/widget/inline-input/model.ts +74 -0
- package/src/browser/widget/inline-stream-diff/inline-stream-diff.handler.tsx +54 -67
- package/src/browser/widget/inline-stream-diff/live-preview.component.tsx +45 -6
- package/src/browser/widget/inline-stream-diff/live-preview.decoration.tsx +40 -112
- package/src/common/utils.ts +2 -2
- package/lib/browser/model/styles.module.less +0 -7
- package/src/browser/model/styles.module.less +0 -7
|
@@ -3,6 +3,7 @@ import { Disposable, ErrorResponse, IDisposable, ReplyResponse } from '@opensumi
|
|
|
3
3
|
import { EOL, ICodeEditor, IPosition, ITextModel, Position, Selection } from '@opensumi/ide-monaco';
|
|
4
4
|
import { ContentWidgetPositionPreference } from '@opensumi/ide-monaco/lib/browser/monaco-exports/editor';
|
|
5
5
|
import { empty, getLeadingWhitespace } from '@opensumi/ide-utils/lib/strings';
|
|
6
|
+
import { LineRange } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/lineRange';
|
|
6
7
|
import { DefaultEndOfLine } from '@opensumi/monaco-editor-core/esm/vs/editor/common/model';
|
|
7
8
|
import { createTextBuffer } from '@opensumi/monaco-editor-core/esm/vs/editor/common/model/textModel';
|
|
8
9
|
import { ModelService } from '@opensumi/monaco-editor-core/esm/vs/editor/common/services/modelService';
|
|
@@ -43,10 +44,13 @@ export abstract class BaseInlineDiffPreviewer<N extends IInlineDiffPreviewerNode
|
|
|
43
44
|
protected inlineContentWidget: AIInlineContentWidget | null = null;
|
|
44
45
|
protected selection: Selection;
|
|
45
46
|
protected model: ITextModel;
|
|
47
|
+
public modelId: string;
|
|
46
48
|
|
|
47
49
|
constructor(protected readonly monacoEditor: ICodeEditor) {
|
|
48
50
|
super();
|
|
49
51
|
this.model = this.monacoEditor.getModel()!;
|
|
52
|
+
this.modelId = this.model.id;
|
|
53
|
+
|
|
50
54
|
this.addDispose(
|
|
51
55
|
Disposable.create(() => {
|
|
52
56
|
if (this.inlineContentWidget) {
|
|
@@ -106,11 +110,7 @@ export abstract class BaseInlineDiffPreviewer<N extends IInlineDiffPreviewerNode
|
|
|
106
110
|
return this.node;
|
|
107
111
|
}
|
|
108
112
|
|
|
109
|
-
public
|
|
110
|
-
return this.node;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
public mount(contentWidget: AIInlineContentWidget): void {
|
|
113
|
+
public mountWidget(contentWidget: AIInlineContentWidget): void {
|
|
114
114
|
this.inlineContentWidget = contentWidget;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -156,20 +156,25 @@ export abstract class BaseInlineDiffPreviewer<N extends IInlineDiffPreviewerNode
|
|
|
156
156
|
setValue(content: string): void {
|
|
157
157
|
// do nothing
|
|
158
158
|
}
|
|
159
|
+
|
|
159
160
|
getValue(): string {
|
|
160
161
|
// do nothing
|
|
161
162
|
return '';
|
|
162
163
|
}
|
|
164
|
+
|
|
163
165
|
getOriginValue(): string {
|
|
164
166
|
// do nothing
|
|
165
167
|
return '';
|
|
166
168
|
}
|
|
169
|
+
|
|
167
170
|
onError(error: ErrorResponse): void {
|
|
168
171
|
// do nothing
|
|
169
172
|
}
|
|
173
|
+
|
|
170
174
|
onAbort(): void {
|
|
171
175
|
// do nothing
|
|
172
176
|
}
|
|
177
|
+
|
|
173
178
|
onEnd(): void {
|
|
174
179
|
// do nothing
|
|
175
180
|
}
|
|
@@ -178,6 +183,30 @@ export abstract class BaseInlineDiffPreviewer<N extends IInlineDiffPreviewerNode
|
|
|
178
183
|
// do nothing
|
|
179
184
|
}
|
|
180
185
|
|
|
186
|
+
/**
|
|
187
|
+
* 会新建一个渲染层的实例
|
|
188
|
+
* 或重新赋值渲染层的数据
|
|
189
|
+
* 适用于首次渲染
|
|
190
|
+
*/
|
|
191
|
+
render(): void {
|
|
192
|
+
// do nothing
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 仅隐藏渲染层,而不销毁实例
|
|
197
|
+
*/
|
|
198
|
+
hide(): void {
|
|
199
|
+
// do nothing
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* 恢复渲染层
|
|
204
|
+
* 适用于非首次渲染
|
|
205
|
+
*/
|
|
206
|
+
resume(): void {
|
|
207
|
+
// do nothing
|
|
208
|
+
}
|
|
209
|
+
|
|
181
210
|
isModel(uri: string): boolean {
|
|
182
211
|
return this.model.uri.toString() === uri;
|
|
183
212
|
}
|
|
@@ -199,30 +228,37 @@ export class SideBySideInlineDiffWidget extends BaseInlineDiffPreviewer<InlineDi
|
|
|
199
228
|
this.addDispose(widget);
|
|
200
229
|
return widget;
|
|
201
230
|
}
|
|
202
|
-
|
|
203
|
-
|
|
231
|
+
|
|
232
|
+
mountWidget(contentWidget: AIInlineContentWidget): void {
|
|
233
|
+
super.mountWidget(contentWidget);
|
|
204
234
|
contentWidget.addDispose(this);
|
|
205
235
|
}
|
|
236
|
+
|
|
206
237
|
getPosition(): IPosition {
|
|
207
238
|
return Position.lift({ lineNumber: this.selection.endLineNumber + 1, column: 1 });
|
|
208
239
|
}
|
|
240
|
+
|
|
209
241
|
layout(): void {
|
|
210
242
|
this.inlineContentWidget?.setPositionPreference([ContentWidgetPositionPreference.BELOW]);
|
|
211
243
|
super.layout();
|
|
212
244
|
}
|
|
245
|
+
|
|
213
246
|
onReady(exec: () => void): IDisposable {
|
|
214
247
|
if (this.node) {
|
|
215
248
|
return this.node!.onReady(exec.bind(this));
|
|
216
249
|
}
|
|
217
250
|
return Disposable.NULL;
|
|
218
251
|
}
|
|
252
|
+
|
|
219
253
|
show(line: number, heightInLines: number): void {
|
|
220
254
|
this.node?.showByLine(line, heightInLines);
|
|
221
255
|
}
|
|
256
|
+
|
|
222
257
|
setValue(content: string): void {
|
|
223
258
|
const modifiedModel = this.node?.getModifiedModel();
|
|
224
259
|
modifiedModel?.setValue(this.formatIndentation(content));
|
|
225
260
|
}
|
|
261
|
+
|
|
226
262
|
getValue(): string {
|
|
227
263
|
const model = this.node?.getModifiedModel();
|
|
228
264
|
return model!.getValue();
|
|
@@ -240,10 +276,12 @@ export class SideBySideInlineDiffWidget extends BaseInlineDiffPreviewer<InlineDi
|
|
|
240
276
|
this.model.pushStackElement();
|
|
241
277
|
}
|
|
242
278
|
}
|
|
279
|
+
|
|
243
280
|
onLineCount(event: (count: number) => void): Disposable {
|
|
244
281
|
this.node?.onMaxLineCount(event.bind(this));
|
|
245
282
|
return this;
|
|
246
283
|
}
|
|
284
|
+
|
|
247
285
|
onData(data: ReplyResponse): void {
|
|
248
286
|
const { message } = data;
|
|
249
287
|
|
|
@@ -258,12 +296,15 @@ export class SideBySideInlineDiffWidget extends BaseInlineDiffPreviewer<InlineDi
|
|
|
258
296
|
disposable.dispose();
|
|
259
297
|
this.node?.layout();
|
|
260
298
|
}
|
|
299
|
+
|
|
261
300
|
onError(error: ErrorResponse): void {
|
|
262
301
|
this.node?.layout();
|
|
263
302
|
}
|
|
303
|
+
|
|
264
304
|
onAbort(): void {
|
|
265
305
|
this.node?.layout();
|
|
266
306
|
}
|
|
307
|
+
|
|
267
308
|
onEnd(): void {
|
|
268
309
|
this.node?.layout();
|
|
269
310
|
}
|
|
@@ -296,30 +337,6 @@ export class LiveInlineDiffPreviewer extends BaseInlineDiffPreviewer<InlineStrea
|
|
|
296
337
|
this.listenNode(node);
|
|
297
338
|
return node;
|
|
298
339
|
}
|
|
299
|
-
attachNode(node: InlineStreamDiffHandler): void {
|
|
300
|
-
this.node?.dispose();
|
|
301
|
-
this.node = node;
|
|
302
|
-
|
|
303
|
-
if (node) {
|
|
304
|
-
const snapshot = node.currentSnapshotStore;
|
|
305
|
-
if (snapshot) {
|
|
306
|
-
this.node.restoreDecorationSnapshot(snapshot.decorationSnapshotData);
|
|
307
|
-
this.listenNode(node);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
public createNodeSnapshot(): InlineStreamDiffHandler | undefined {
|
|
312
|
-
if (!this.node) {
|
|
313
|
-
return this.createNode();
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// 拿前一个 node 的快照信息
|
|
317
|
-
const snapshot = this.node.createSnapshot();
|
|
318
|
-
// 创建新的实例
|
|
319
|
-
const node = this.injector.get(InlineStreamDiffHandler, [this.monacoEditor]);
|
|
320
|
-
node.restoreSnapshot(snapshot);
|
|
321
|
-
return node;
|
|
322
|
-
}
|
|
323
340
|
|
|
324
341
|
getPosition(): IPosition {
|
|
325
342
|
const zone = this.node?.getZone();
|
|
@@ -328,6 +345,7 @@ export class LiveInlineDiffPreviewer extends BaseInlineDiffPreviewer<InlineStrea
|
|
|
328
345
|
}
|
|
329
346
|
return Position.lift({ lineNumber: 1, column: 1 });
|
|
330
347
|
}
|
|
348
|
+
|
|
331
349
|
handleAction(action: EResultKind): void {
|
|
332
350
|
switch (action) {
|
|
333
351
|
case EResultKind.ACCEPT:
|
|
@@ -343,9 +361,11 @@ export class LiveInlineDiffPreviewer extends BaseInlineDiffPreviewer<InlineStrea
|
|
|
343
361
|
break;
|
|
344
362
|
}
|
|
345
363
|
}
|
|
364
|
+
|
|
346
365
|
onLineCount() {
|
|
347
366
|
return Disposable.NULL;
|
|
348
367
|
}
|
|
368
|
+
|
|
349
369
|
layout(): void {
|
|
350
370
|
this.inlineContentWidget?.setPositionPreference([
|
|
351
371
|
ContentWidgetPositionPreference.ABOVE,
|
|
@@ -365,17 +385,52 @@ export class LiveInlineDiffPreviewer extends BaseInlineDiffPreviewer<InlineStrea
|
|
|
365
385
|
const firstRemovedWidgetLineNumber = firstRemovedWidget.getLastPosition()?.lineNumber;
|
|
366
386
|
if (firstRemovedWidgetLineNumber <= lineNumber) {
|
|
367
387
|
const lineHeight = this.inlineContentWidget.getLineHeight();
|
|
368
|
-
const len = firstRemovedWidget.height;
|
|
388
|
+
const len = firstRemovedWidget.height + 1;
|
|
369
389
|
this.inlineContentWidget.setOffsetTop(-lineHeight * len - 4);
|
|
390
|
+
} else {
|
|
391
|
+
this.inlineContentWidget.setOffsetTop(0);
|
|
370
392
|
}
|
|
371
393
|
}
|
|
394
|
+
} else {
|
|
395
|
+
this.inlineContentWidget.setOffsetTop(0);
|
|
372
396
|
}
|
|
373
397
|
}
|
|
374
398
|
}
|
|
399
|
+
|
|
400
|
+
render(): void {
|
|
401
|
+
this.inlineContentWidget?.show();
|
|
402
|
+
this.node?.rateRenderEditController();
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
hide(): void {
|
|
406
|
+
this.inlineContentWidget?.hide();
|
|
407
|
+
this.node?.hide();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
resume(): void {
|
|
411
|
+
this.inlineContentWidget?.show();
|
|
412
|
+
this.node?.resume();
|
|
413
|
+
}
|
|
414
|
+
|
|
375
415
|
onData(data: ReplyResponse): void {
|
|
376
416
|
const { message } = data;
|
|
377
417
|
this.node?.addLinesToDiff(this.formatIndentation(message));
|
|
378
418
|
}
|
|
419
|
+
|
|
420
|
+
onAbort(): void {
|
|
421
|
+
const diffModel = this.node?.recompute(EComputerMode.default);
|
|
422
|
+
if (diffModel) {
|
|
423
|
+
/**
|
|
424
|
+
* abort 的时候,需要保留当前已经输出的内容
|
|
425
|
+
* 同时需要去掉流式过程中的 pending 区域和 activeLine
|
|
426
|
+
*/
|
|
427
|
+
diffModel.activeLine = 0;
|
|
428
|
+
diffModel.pendingRange = new LineRange(0, 0);
|
|
429
|
+
|
|
430
|
+
this.node?.finallyRender(diffModel);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
379
434
|
onEnd(): void {
|
|
380
435
|
const diffModel = this.node?.recompute(EComputerMode.legacy);
|
|
381
436
|
if (diffModel) {
|
|
@@ -6,12 +6,18 @@ import {
|
|
|
6
6
|
Emitter,
|
|
7
7
|
Event,
|
|
8
8
|
IDisposable,
|
|
9
|
-
IEventBus,
|
|
10
9
|
ReplyResponse,
|
|
11
10
|
} from '@opensumi/ide-core-common';
|
|
12
|
-
import { EditorGroupCloseEvent } from '@opensumi/ide-editor/lib/browser';
|
|
13
11
|
import * as monaco from '@opensumi/ide-monaco';
|
|
14
12
|
import { ICodeEditor } from '@opensumi/ide-monaco';
|
|
13
|
+
import {
|
|
14
|
+
IObservable,
|
|
15
|
+
ISettableObservable,
|
|
16
|
+
autorun,
|
|
17
|
+
observableFromEvent,
|
|
18
|
+
observableValue,
|
|
19
|
+
transaction,
|
|
20
|
+
} from '@opensumi/ide-monaco/lib/common/observable';
|
|
15
21
|
|
|
16
22
|
import { BaseAIMonacoEditorController } from '../../contrib/base';
|
|
17
23
|
import { EInlineDiffPreviewMode } from '../../preferences/schema';
|
|
@@ -27,6 +33,8 @@ import {
|
|
|
27
33
|
} from './inline-diff-previewer';
|
|
28
34
|
import { InlineDiffWidget } from './inline-diff-widget';
|
|
29
35
|
|
|
36
|
+
type IInlineDiffPreviewer = BaseInlineDiffPreviewer<InlineDiffWidget | InlineStreamDiffHandler>;
|
|
37
|
+
|
|
30
38
|
export class InlineDiffController extends BaseAIMonacoEditorController {
|
|
31
39
|
public static readonly ID = 'editor.contrib.ai.inline.diff';
|
|
32
40
|
|
|
@@ -38,106 +46,68 @@ export class InlineDiffController extends BaseAIMonacoEditorController {
|
|
|
38
46
|
return this.injector.get(PreferenceService);
|
|
39
47
|
}
|
|
40
48
|
|
|
41
|
-
private get eventBus(): IEventBus {
|
|
42
|
-
return this.injector.get(IEventBus);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
49
|
private readonly _onMaxLineCount = new Emitter<number>();
|
|
46
50
|
public readonly onMaxLineCount: Event<number> = this._onMaxLineCount.event;
|
|
47
51
|
|
|
48
|
-
private
|
|
49
|
-
private
|
|
52
|
+
private previewerStore: Map<string, IInlineDiffPreviewer>;
|
|
53
|
+
private currentPreviewer: ISettableObservable<IInlineDiffPreviewer | undefined>;
|
|
54
|
+
private modelChangeObs: IObservable<monaco.editor.ITextModel, unknown>;
|
|
50
55
|
|
|
51
56
|
mount(): IDisposable {
|
|
57
|
+
this.previewerStore = new Map();
|
|
58
|
+
this.currentPreviewer = observableValue(this, undefined);
|
|
59
|
+
this.modelChangeObs = observableFromEvent<monaco.editor.ITextModel>(
|
|
60
|
+
this,
|
|
61
|
+
this.monacoEditor.onDidChangeModel,
|
|
62
|
+
() => this.monacoEditor.getModel()!,
|
|
63
|
+
);
|
|
64
|
+
|
|
52
65
|
this.featureDisposable.addDispose(
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
66
|
+
autorun((reader) => {
|
|
67
|
+
const model = this.modelChangeObs.read(reader);
|
|
68
|
+
if (!model) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
56
71
|
|
|
57
|
-
|
|
58
|
-
|
|
72
|
+
/**
|
|
73
|
+
* 切换到其他 model 且 previewer 未卸载时
|
|
74
|
+
* 保留 previewer 的实例,仅卸载 previewer 的渲染层
|
|
75
|
+
*/
|
|
76
|
+
const id = model.id;
|
|
77
|
+
const previewer = this.currentPreviewer.get();
|
|
78
|
+
if (previewer && previewer.modelId !== id && !previewer.disposed) {
|
|
79
|
+
previewer.hide();
|
|
59
80
|
}
|
|
81
|
+
|
|
82
|
+
const storedPreview = this.previewerStore.get(model.id);
|
|
83
|
+
transaction((tx) => {
|
|
84
|
+
if (storedPreview && storedPreview.modelId === id) {
|
|
85
|
+
this.currentPreviewer.set(storedPreview, tx);
|
|
86
|
+
storedPreview.resume();
|
|
87
|
+
} else {
|
|
88
|
+
this.currentPreviewer.set(undefined, tx);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
60
91
|
}),
|
|
61
92
|
);
|
|
62
93
|
|
|
63
|
-
this.registerInlineDiffFeature(this.monacoEditor);
|
|
64
|
-
|
|
65
94
|
return this.featureDisposable;
|
|
66
95
|
}
|
|
67
96
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// 存储的是快照
|
|
74
|
-
const node = this.previewer.createNodeSnapshot();
|
|
75
|
-
if (node) {
|
|
76
|
-
this._previewerNodeStore.set(key, node as InlineStreamDiffHandler);
|
|
77
|
-
}
|
|
97
|
+
getPreviewer(): IInlineDiffPreviewer | undefined {
|
|
98
|
+
return this.currentPreviewer.get();
|
|
78
99
|
}
|
|
79
100
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (!node) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (node.disposed) {
|
|
87
|
-
this.destroyPreviewer(key);
|
|
101
|
+
private renderDiff(previewer: IInlineDiffPreviewer, data: ReplyResponse) {
|
|
102
|
+
if (!previewer) {
|
|
88
103
|
return;
|
|
89
104
|
}
|
|
90
105
|
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
restoreState(monacoEditor: monaco.ICodeEditor, node: InlineStreamDiffHandler) {
|
|
95
|
-
const uri = monacoEditor.getModel()?.uri;
|
|
96
|
-
|
|
97
|
-
if (uri) {
|
|
98
|
-
this.previewer = this.injector.get(LiveInlineDiffPreviewer, [monacoEditor]);
|
|
99
|
-
this.previewer.attachNode(node);
|
|
100
|
-
this.listenPreviewer(this.previewer);
|
|
101
|
-
|
|
102
|
-
const dispose = this.previewer.onDispose(() => {
|
|
103
|
-
this.destroyPreviewer();
|
|
104
|
-
dispose.dispose();
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
registerInlineDiffFeature(monacoEditor: monaco.ICodeEditor): void {
|
|
110
|
-
const model = monacoEditor.getModel();
|
|
111
|
-
|
|
112
|
-
this.featureDisposable.addDispose(
|
|
113
|
-
monacoEditor.onWillChangeModel((e) => {
|
|
114
|
-
if (!e.oldModelUrl) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const urlString = e.oldModelUrl.toString();
|
|
119
|
-
this.storeState(urlString);
|
|
120
|
-
|
|
121
|
-
this.destroyPreviewer();
|
|
122
|
-
}),
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
this.featureDisposable.addDispose(
|
|
126
|
-
monacoEditor.onDidChangeModel((e) => {
|
|
127
|
-
if (!e.newModelUrl) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
this.tryRestoreState(monacoEditor, e.newModelUrl.toString());
|
|
131
|
-
}),
|
|
132
|
-
);
|
|
106
|
+
previewer.onData(data);
|
|
133
107
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const uriString = model.uri.toString();
|
|
138
|
-
this.destroyPreviewer(uriString);
|
|
139
|
-
}),
|
|
140
|
-
);
|
|
108
|
+
// 仅在当前 model 中进行流式渲染
|
|
109
|
+
if (this.modelChangeObs.get()?.id === previewer.modelId) {
|
|
110
|
+
previewer.render();
|
|
141
111
|
}
|
|
142
112
|
}
|
|
143
113
|
|
|
@@ -154,6 +124,10 @@ export class InlineDiffController extends BaseAIMonacoEditorController {
|
|
|
154
124
|
const disposable = new Disposable();
|
|
155
125
|
|
|
156
126
|
const previewer = this.createDiffPreviewer(monacoEditor, crossSelection, options.previewerOptions);
|
|
127
|
+
transaction((tx) => {
|
|
128
|
+
this.currentPreviewer.set(previewer, tx);
|
|
129
|
+
this.previewerStore.set(previewer.modelId, previewer);
|
|
130
|
+
});
|
|
157
131
|
|
|
158
132
|
const onFinish = () => {
|
|
159
133
|
previewer.layout();
|
|
@@ -168,7 +142,7 @@ export class InlineDiffController extends BaseAIMonacoEditorController {
|
|
|
168
142
|
disposable.addDispose([
|
|
169
143
|
controller.onData((data) => {
|
|
170
144
|
if (ReplyResponse.is(data)) {
|
|
171
|
-
|
|
145
|
+
this.renderDiff(previewer, data);
|
|
172
146
|
}
|
|
173
147
|
}),
|
|
174
148
|
controller.onError((error) => {
|
|
@@ -203,59 +177,61 @@ export class InlineDiffController extends BaseAIMonacoEditorController {
|
|
|
203
177
|
EInlineDiffPreviewMode.inlineLive,
|
|
204
178
|
);
|
|
205
179
|
|
|
206
|
-
|
|
180
|
+
let previewer: IInlineDiffPreviewer;
|
|
207
181
|
|
|
208
182
|
if (inlineDiffMode === EInlineDiffPreviewMode.sideBySide) {
|
|
209
|
-
|
|
183
|
+
previewer = this.injector.get(SideBySideInlineDiffWidget, [monacoEditor]);
|
|
210
184
|
} else {
|
|
211
|
-
|
|
185
|
+
previewer = this.injector.get(LiveInlineDiffPreviewer, [monacoEditor]);
|
|
212
186
|
}
|
|
213
187
|
|
|
214
|
-
|
|
215
|
-
|
|
188
|
+
previewer.create(selection, options);
|
|
189
|
+
previewer.show(selection.startLineNumber - 1, selection.endLineNumber - selection.startLineNumber + 2);
|
|
216
190
|
|
|
217
|
-
|
|
191
|
+
previewer.addDispose(previewer.onLineCount((lineCount) => this._onMaxLineCount.fire(lineCount)));
|
|
218
192
|
|
|
219
|
-
|
|
193
|
+
previewer.addDispose(
|
|
194
|
+
Disposable.create(() => {
|
|
195
|
+
this.previewerStore.delete(previewer.modelId);
|
|
196
|
+
}),
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
return previewer;
|
|
220
200
|
}
|
|
221
201
|
|
|
222
|
-
|
|
202
|
+
handleAction(action: EResultKind): void {
|
|
203
|
+
const previewer = this.getPreviewer();
|
|
223
204
|
if (!previewer) {
|
|
224
205
|
return;
|
|
225
206
|
}
|
|
226
207
|
|
|
227
|
-
previewer.
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
getPreviewer(): BaseInlineDiffPreviewer<InlineDiffWidget | InlineStreamDiffHandler> | undefined {
|
|
231
|
-
return this.previewer;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
getStoredState(uri: string) {
|
|
235
|
-
return this._previewerNodeStore.get(uri);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
handleAction(action: EResultKind): void {
|
|
239
|
-
this.previewer?.handleAction(action);
|
|
208
|
+
previewer.handleAction(action);
|
|
240
209
|
}
|
|
241
210
|
|
|
242
211
|
getModifyContent() {
|
|
243
|
-
|
|
244
|
-
|
|
212
|
+
const previewer = this.getPreviewer();
|
|
213
|
+
if (!previewer) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
245
216
|
|
|
246
|
-
|
|
247
|
-
return this.previewer?.getOriginValue();
|
|
217
|
+
return previewer.getValue();
|
|
248
218
|
}
|
|
249
219
|
|
|
250
|
-
|
|
251
|
-
this.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
this._previewerNodeStore.delete(uriString);
|
|
220
|
+
getOriginContent() {
|
|
221
|
+
const previewer = this.getPreviewer();
|
|
222
|
+
if (!previewer) {
|
|
223
|
+
return;
|
|
255
224
|
}
|
|
225
|
+
|
|
226
|
+
return previewer.getOriginValue();
|
|
256
227
|
}
|
|
257
228
|
|
|
258
229
|
revealFirstDiff() {
|
|
259
|
-
this.
|
|
230
|
+
const previewer = this.getPreviewer();
|
|
231
|
+
if (!previewer) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
previewer.revealFirstDiff();
|
|
260
236
|
}
|
|
261
237
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import throttle from 'lodash/throttle';
|
|
2
2
|
|
|
3
3
|
import { Disposable, IDisposable } from '@opensumi/ide-core-common';
|
|
4
|
-
import { ICodeEditor } from '@opensumi/ide-monaco';
|
|
5
4
|
import * as monaco from '@opensumi/ide-monaco';
|
|
5
|
+
import { ICodeEditor } from '@opensumi/ide-monaco';
|
|
6
6
|
|
|
7
7
|
import { AINativeContextKey } from '../../ai-core.contextkeys';
|
|
8
8
|
import { BaseAIMonacoEditorController } from '../../contrib/base';
|
|
9
9
|
import { AICompletionsService } from '../../contrib/inline-completions/service/ai-completions.service';
|
|
10
|
-
import { InlineInputChatService } from '../inline-input/inline-input.service';
|
|
11
10
|
import { InlineInputPreviewDecorationID } from '../internal.type';
|
|
12
11
|
|
|
13
12
|
import { InlineHintLineDecoration } from './inline-hint-line-widget';
|
|
@@ -23,10 +22,6 @@ export class InlineHintController extends BaseAIMonacoEditorController {
|
|
|
23
22
|
return this.injector.get(AICompletionsService);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
private get inlineInputChatService(): InlineInputChatService {
|
|
27
|
-
return this.injector.get(InlineInputChatService);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
25
|
mount(): IDisposable {
|
|
31
26
|
return this.registerHintLineFeature(this.monacoEditor);
|
|
32
27
|
}
|
|
@@ -59,7 +54,6 @@ export class InlineHintController extends BaseAIMonacoEditorController {
|
|
|
59
54
|
if (!lineContent?.trim()) {
|
|
60
55
|
inlineHintLineDecoration.show(position);
|
|
61
56
|
}
|
|
62
|
-
this.inlineInputChatService.setCurrentVisiblePosition(position);
|
|
63
57
|
|
|
64
58
|
aiNativeContextKey.inlineHintWidgetIsVisible.set(true);
|
|
65
59
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Injectable } from '@opensumi/di';
|
|
4
|
+
import { AINativeConfigService, useInjectable } from '@opensumi/ide-core-browser';
|
|
4
5
|
import { AIAction, InteractiveInput } from '@opensumi/ide-core-browser/lib/components/ai-native/index';
|
|
5
|
-
import { AIInlineInputChatContentWidgetId, Disposable, Event, localize } from '@opensumi/ide-core-common';
|
|
6
|
+
import { AIInlineInputChatContentWidgetId, Disposable, Emitter, Event, localize } from '@opensumi/ide-core-common';
|
|
6
7
|
import { ContentWidgetPositionPreference } from '@opensumi/ide-monaco/lib/browser/monaco-exports/editor';
|
|
7
8
|
|
|
8
9
|
import { InlineResultAction } from '../inline-actions/result-items/index';
|
|
@@ -10,19 +11,24 @@ import { EInlineChatStatus, EResultKind } from '../inline-chat/inline-chat.servi
|
|
|
10
11
|
import { AIInlineContentWidget } from '../inline-chat/inline-content-widget';
|
|
11
12
|
|
|
12
13
|
import styles from './inline-input.module.less';
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
import type { ICodeEditor as IMonacoCodeEditor } from '@opensumi/ide-monaco';
|
|
14
16
|
|
|
15
17
|
interface IInlineInputWidgetRenderProps {
|
|
18
|
+
defaultValue?: string;
|
|
16
19
|
onLayoutChange: (height: number) => void;
|
|
17
20
|
onClose?: () => void;
|
|
18
21
|
onInteractiveInputSend?: (value: string) => void;
|
|
19
22
|
onChatStatus: Event<EInlineChatStatus>;
|
|
20
23
|
onResultClick: (k: EResultKind) => void;
|
|
24
|
+
onValueChange?: (value: string) => void;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
const InlineInputWidgetRender = (props: IInlineInputWidgetRenderProps) => {
|
|
24
|
-
const { onClose, onInteractiveInputSend, onLayoutChange, onChatStatus, onResultClick } =
|
|
28
|
+
const { defaultValue, onClose, onInteractiveInputSend, onLayoutChange, onChatStatus, onResultClick, onValueChange } =
|
|
29
|
+
props;
|
|
25
30
|
const [status, setStatus] = useState<EInlineChatStatus>(EInlineChatStatus.READY);
|
|
31
|
+
const aiNativeConfigService = useInjectable<AINativeConfigService>(AINativeConfigService);
|
|
26
32
|
|
|
27
33
|
useEffect(() => {
|
|
28
34
|
const dis = new Disposable();
|
|
@@ -64,10 +70,12 @@ const InlineInputWidgetRender = (props: IInlineInputWidgetRenderProps) => {
|
|
|
64
70
|
customOperationRender={
|
|
65
71
|
<InteractiveInput
|
|
66
72
|
autoFocus
|
|
73
|
+
defaultValue={defaultValue}
|
|
74
|
+
onValueChange={onValueChange}
|
|
67
75
|
onHeightChange={(height) => onLayoutChange(height)}
|
|
68
76
|
size='small'
|
|
69
77
|
placeholder={localize('aiNative.inline.chat.input.placeholder.default')}
|
|
70
|
-
width={
|
|
78
|
+
width={aiNativeConfigService.inlineChat.inputWidth}
|
|
71
79
|
disabled={isLoading}
|
|
72
80
|
onSend={handleInteractiveInputSend}
|
|
73
81
|
/>
|
|
@@ -77,16 +85,26 @@ const InlineInputWidgetRender = (props: IInlineInputWidgetRenderProps) => {
|
|
|
77
85
|
};
|
|
78
86
|
|
|
79
87
|
@Injectable({ multiple: true })
|
|
80
|
-
export class
|
|
81
|
-
@Autowired(InlineInputChatService)
|
|
82
|
-
private inlineInputChatService: InlineInputChatService;
|
|
83
|
-
|
|
88
|
+
export class InlineInputWidget extends AIInlineContentWidget {
|
|
84
89
|
allowEditorOverflow = true;
|
|
85
90
|
positionPreference = [ContentWidgetPositionPreference.ABOVE];
|
|
86
91
|
|
|
92
|
+
protected readonly _onSend = new Emitter<string>();
|
|
93
|
+
public readonly onSend = this._onSend.event;
|
|
94
|
+
|
|
95
|
+
protected readonly _onClose = new Emitter<void>();
|
|
96
|
+
public readonly onClose = this._onClose.event;
|
|
97
|
+
|
|
98
|
+
protected readonly _onValueChange = new Emitter<string>();
|
|
99
|
+
public readonly onValueChange = this._onValueChange.event;
|
|
100
|
+
|
|
101
|
+
constructor(protected readonly editor: IMonacoCodeEditor, protected readonly defaultValue?: string) {
|
|
102
|
+
super(editor);
|
|
103
|
+
}
|
|
104
|
+
|
|
87
105
|
override dispose(): void {
|
|
88
106
|
super.dispose();
|
|
89
|
-
this.
|
|
107
|
+
this.inlineInputService.hide();
|
|
90
108
|
}
|
|
91
109
|
|
|
92
110
|
override id(): string {
|
|
@@ -97,14 +115,18 @@ export class InlineInputChatWidget extends AIInlineContentWidget {
|
|
|
97
115
|
return (
|
|
98
116
|
<div className={styles.input_wrapper}>
|
|
99
117
|
<InlineInputWidgetRender
|
|
100
|
-
|
|
118
|
+
defaultValue={this.defaultValue}
|
|
119
|
+
onClose={() => this._onClose.fire()}
|
|
101
120
|
onChatStatus={this.onStatusChange.bind(this)}
|
|
102
121
|
onLayoutChange={() => {
|
|
103
122
|
this.editor.layoutContentWidget(this);
|
|
104
123
|
}}
|
|
124
|
+
onValueChange={(value) => {
|
|
125
|
+
this._onValueChange.fire(value);
|
|
126
|
+
}}
|
|
105
127
|
onInteractiveInputSend={(value) => {
|
|
106
128
|
this.launchChatStatus(EInlineChatStatus.THINKING);
|
|
107
|
-
this.
|
|
129
|
+
this._onSend.fire(value);
|
|
108
130
|
}}
|
|
109
131
|
onResultClick={(k: EResultKind) => {
|
|
110
132
|
this._onResultClick.fire(k);
|