Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: optimize merge conflict #3585

Merged
merged 31 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4578906
chore: update en translation
bytemain Apr 15, 2024
8938ccb
feat: optimize merge
bytemain Apr 15, 2024
06d6e1c
refactor: update code
bytemain Apr 16, 2024
2ad7546
chore: use menubar view
bytemain Apr 16, 2024
ed3cdb6
feat: use lru map in conflict parser
bytemain Apr 16, 2024
fa1ba8c
refactor: update code
bytemain Apr 16, 2024
1b71ba0
refactor: update code
bytemain Apr 16, 2024
bb11496
feat: show conflict info
bytemain Apr 16, 2024
0130ff3
chore: update code
bytemain Apr 17, 2024
bbc2914
Merge remote-tracking branch 'origin/main' into feat/update-merge-con…
bytemain Apr 22, 2024
13ed001
feat: show merge info for 3way
bytemain Apr 28, 2024
416c7df
fix: accept left or right is broken
bytemain Apr 28, 2024
ac82c28
chore: update code
bytemain Apr 28, 2024
039b752
fix: fix reset not work
bytemain Apr 28, 2024
9fe3480
chore: update code
bytemain Apr 28, 2024
7c88a37
chore: update code
bytemain Apr 28, 2024
cd36f71
feat: show inline diff in merge conflicts
bytemain Apr 29, 2024
5edc5e0
feat: support auto stage
bytemain Apr 29, 2024
bd0d255
feat: support show diff
bytemain Apr 30, 2024
a3adb61
feat: implement diff
bytemain Apr 30, 2024
b141e44
feat: optimize ui string
bytemain Apr 30, 2024
17e8115
Merge remote-tracking branch 'origin/main' into feat/update-merge-con…
bytemain Apr 30, 2024
2add7f0
build: fix build
bytemain Apr 30, 2024
c027d67
chore: fix build script
bytemain Apr 30, 2024
8ad834f
fix: decoration is not correct
bytemain Apr 30, 2024
577459e
fix: compatible with popover
bytemain Apr 30, 2024
f63e97e
fix: context key
bytemain Apr 30, 2024
fec3bd7
feat: add i18n
bytemain Apr 30, 2024
cded799
Merge branch 'main' into feat/update-merge-conflict
bytemain Apr 30, 2024
69a4ab8
chore: add missing i18n
bytemain Apr 30, 2024
a6fdb82
Merge branch 'main' into feat/update-merge-conflict
bytemain Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/ai-native/src/browser/ai-editor.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { AINativeCoreContribution, IAIMiddleware } from './types';
import { InlineChatFeatureRegistry } from './widget/inline-chat/inline-chat.feature.registry';
import { AIInlineChatService, EInlineChatStatus } from './widget/inline-chat/inline-chat.service';
import { AIInlineContentWidget } from './widget/inline-chat/inline-content-widget';
import { AIDiffWidget } from './widget/inline-diff/inline-diff-widget';
import { InlineDiffWidget } from './widget/inline-diff/inline-diff-widget';

@Injectable()
export class AIEditorContribution extends Disposable implements IEditorFeatureContribution {
Expand Down Expand Up @@ -105,7 +105,7 @@ export class AIEditorContribution extends Disposable implements IEditorFeatureCo
this.logger = this.loggerManagerClient.getLogger(SupportLogNamespace.Browser);
}

private aiDiffWidget: AIDiffWidget;
private aiDiffWidget: InlineDiffWidget;
private aiInlineContentWidget: AIInlineContentWidget;
private aiInlineChatDisposed: Disposable = new Disposable();
private aiInlineChatOperationDisposed: Disposable = new Disposable();
Expand Down Expand Up @@ -453,7 +453,7 @@ export class AIEditorContribution extends Disposable implements IEditorFeatureCo
this.aiInlineChatService.onThumbs((isLike: boolean) => {
this.aiReporter.end(relationId, { isLike });
}),
this.aiDiffWidget.onMaxLincCount((count) => {
this.aiDiffWidget.onMaxLineCount((count) => {
requestAnimationFrame(() => {
if (crossSelection.endLineNumber === model!.getLineCount()) {
const lineHeight = monacoEditor.getOption(monacoApi.editor.EditorOption.lineHeight);
Expand Down Expand Up @@ -487,8 +487,8 @@ export class AIEditorContribution extends Disposable implements IEditorFeatureCo
}

private visibleDiffWidget(monacoEditor: monaco.ICodeEditor, crossSelection: monaco.Selection, answer: string): void {
monacoEditor.setHiddenAreas([crossSelection], AIDiffWidget._hideId);
this.aiDiffWidget = this.injector.get(AIDiffWidget, [monacoEditor, crossSelection, answer]);
monacoEditor.setHiddenAreas([crossSelection], InlineDiffWidget._hideId);
this.aiDiffWidget = this.injector.get(InlineDiffWidget, [monacoEditor, crossSelection, answer]);
this.aiDiffWidget.create();
this.aiDiffWidget.showByLine(
crossSelection.startLineNumber - 1,
Expand Down
Loading
Loading