Skip to content

Commit 5b24e88

Browse files
committed
Update git merge base branch reference and refine tab component styles
- active tab should look like an active prompt type button (blue) - keep colors, restore shape: [Changes] - In `apps/editor/src/views/prompt/backend/utils/symbols/git/replace-git-symbols.ts`, update `replace_changes_symbol` so it compares against the local branch instead of the remote tracking branch. ├── apps │ └── editor │ └── src │ ├── commands │ │ ├── search-files-commands │ │ │ └── utils │ │ │ └── prompt-for-provided-results.ts │ │ ├── select-imported-files-commands │ │ │ └── utils │ │ │ └── prompt-for-imported-files.ts │ │ └── select-referencing-files-commands │ │ └── utils │ │ └── prompt-for-referencing-files.ts │ ├── features │ │ └── search-files │ │ └── utils │ │ ├── prompt-for-intelligent-search-results.ts │ │ └── prompt-for-search-results.ts │ ├── i18n │ │ └── translations │ │ └── common.ts │ └── views │ └── prompt │ └── backend │ └── utils │ └── symbols │ ├── git │ │ └── replace-git-symbols.ts │ └── replace-symbols.ts └── packages └── ui └── src ├── components │ └── editor │ └── prompt │ ├── PromptTypeButton │ │ ├── PromptTypeButton.module.scss │ │ ├── PromptTypeButton.stories.tsx │ │ ├── PromptTypeButton.tsx │ │ └── index.ts │ └── Tabs │ ├── Tabs.module.scss │ ├── Tabs.tsx │ └── index.ts └── styles └── foundation └── _colors.scss
1 parent f9f8bbe commit 5b24e88

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎apps/editor/src/views/prompt/backend/utils/symbols/git/replace-git-symbols.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export const replace_changes_symbol = async (params: {
194194
let diff_base: string
195195
if (current_branch == branch_name) {
196196
// If comparing to same branch, use merge-base to show changes since branch point
197-
diff_base = execSync(`git merge-base HEAD origin/${branch_name}`, {
197+
diff_base = execSync(`git merge-base HEAD ${branch_name}`, {
198198
cwd: target_folder.uri.fsPath
199199
})
200200
.toString()
@@ -269,7 +269,7 @@ export const replace_changes_symbol = async (params: {
269269
let diff_base: string
270270
if (current_branch == branch_name) {
271271
// If comparing to same branch, use merge-base to show changes since branch point
272-
diff_base = execSync(`git merge-base HEAD origin/${branch_name}`, {
272+
diff_base = execSync(`git merge-base HEAD ${branch_name}`, {
273273
cwd: repository.rootUri.fsPath
274274
})
275275
.toString()

‎packages/ui/src/components/editor/prompt/Tabs/Tabs.module.scss‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,22 @@
3030
align-items: center;
3131
text-transform: none;
3232
color: var(--cwc-text-color-dimmed);
33+
cursor: pointer;
34+
white-space: nowrap;
35+
user-select: none;
3336

3437
&:hover {
3538
color: var(--cwc-text-color);
3639
}
3740

41+
&:focus-visible {
42+
outline: 1px solid var(--vscode-focusBorder);
43+
outline-offset: -1px;
44+
}
45+
3846
&--active {
39-
color: var(--cwc-text-color);
47+
color: var(--cwc-text-color-blue);
48+
background-color: var(--cwc-bg-blue);
4049
border-color: var(--vscode-menu-separatorBackground);
4150
position: relative;
4251

@@ -47,7 +56,12 @@
4756
right: 0;
4857
bottom: -1px;
4958
height: 1px;
50-
background: var(--vscode-sideBar-background);
59+
background: var(--cwc-bg-blue);
60+
}
61+
62+
&:hover {
63+
background-color: var(--cwc-bg-blue);
64+
color: var(--cwc-text-color-blue);
5165
}
5266
}
5367
}

0 commit comments

Comments
 (0)