Skip to content

Commit acb2769

Browse files
Merge pull request #5868 from continuedev/nate/emphasize-current-file-over-codebase
always show active file in input toolbar, not codebase
2 parents d51e5e1 + 9917517 commit acb2769

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

gui/src/components/mainInput/InputToolbar.tsx

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import {
1111
} from "../../redux/selectors/selectCurrentToolCall";
1212
import { selectSelectedChatModel } from "../../redux/slices/configSlice";
1313
import { exitEdit } from "../../redux/thunks/edit";
14-
import {
15-
getAltKeyLabel,
16-
getMetaKeyLabel,
17-
isMetaEquivalentKeyPressed,
18-
} from "../../util";
14+
import { getAltKeyLabel, isMetaEquivalentKeyPressed } from "../../util";
1915
import { ToolTip } from "../gui/Tooltip";
2016
import ModelSelect from "../modelSelection/ModelSelect";
2117
import { ModeSelect } from "../ModeSelect";
@@ -160,32 +156,28 @@ function InputToolbar(props: InputToolbarProps) {
160156
<div
161157
className={`${toolsSupported ? "md:flex" : "int:flex"} hover:underline" hidden transition-colors duration-200`}
162158
>
163-
{props.activeKey === "Alt" ? (
164-
<HoverItem className="underline">
165-
{`${getAltKeyLabel()}
166-
${useActiveFile ? "No active file" : "Active file"}`}
167-
</HoverItem>
168-
) : (
169-
<HoverItem
170-
className={props.activeKey === "Meta" ? "underline" : ""}
171-
onClick={(e) =>
172-
props.onEnter?.({
173-
useCodebase: true,
174-
noContext: !useActiveFile,
175-
})
176-
}
177-
>
178-
<span data-tooltip-id="add-codebase-context-tooltip">
179-
{getMetaKeyLabel()}⏎ @codebase
180-
</span>
181-
<ToolTip id="add-codebase-context-tooltip" place="top-end">
182-
Send With Codebase as Context ({getMetaKeyLabel()}⏎)
183-
</ToolTip>
184-
</HoverItem>
185-
)}
159+
<HoverItem
160+
className={props.activeKey === "Alt" ? "underline" : ""}
161+
onClick={(e) =>
162+
props.onEnter?.({
163+
useCodebase: false,
164+
noContext: !useActiveFile,
165+
})
166+
}
167+
>
168+
<span data-tooltip-id="add-active-file-context-tooltip">
169+
{getAltKeyLabel()}{" "}
170+
{useActiveFile ? "No active file" : "Active file"}
171+
</span>
172+
<ToolTip id="add-active-file-context-tooltip" place="top-end">
173+
{useActiveFile
174+
? "Send Without Active File"
175+
: "Send With Active File"}{" "}
176+
({getAltKeyLabel()}⏎)
177+
</ToolTip>
178+
</HoverItem>
186179
</div>
187180
)}
188-
189181
{isInEdit && (
190182
<HoverItem
191183
className="hidden hover:underline sm:flex"

0 commit comments

Comments
 (0)