Merge pull request #5085 from continuedev/dallin/tweaks-12

UI tweaks
This commit is contained in:
Patrick Erichsen 2025-04-09 21:28:36 -07:00 • committed by GitHub
commit 4e8a69ec30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 6 deletions

View file

@ -34,13 +34,18 @@ export function ctxItemToRifWithContents(
): RangeInFileWithContents {
let startLine = 0;
let endLine = 0;
let adjustLines = linesOffByOne ? 1 : 0;
const nameSplit = item.name.split("(");
if (nameSplit.length > 1) {
const lines = nameSplit[1].split(")")[0].split("-");
startLine = Number.parseInt(lines[0], 10) - (linesOffByOne ? 1 : 0);
endLine = Number.parseInt(lines[1], 10) - (linesOffByOne ? 1 : 0);
startLine = Number.parseInt(lines[0], 10);
if (startLine === 0) {
adjustLines = 0; // safety to make sure doesn't go negative
}
startLine -= adjustLines;
endLine = Number.parseInt(lines[1], 10) - adjustLines;
}
const rif: RangeInFileWithContents = {

View file

@ -42,7 +42,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
const isRangeInFile = name.includes(" (") && name.endsWith(")");
if (isRangeInFile) {
const rif = ctxItemToRifWithContents(contextItem);
const rif = ctxItemToRifWithContents(contextItem, true);
ideMessenger.ide.showLines(
rif.filepath,
rif.range.start.line,

View file

@ -52,9 +52,11 @@ export default function ApplyActions(props: ApplyActionsProps) {
case "streaming":
return (
<div className="flex items-center rounded bg-zinc-700 pl-2 pr-1">
<span className="inline-flex items-center gap-2 text-xs text-gray-400">
<span className="inline-flex w-min items-center gap-2 text-center text-xs text-gray-400">
Applying changes
<Spinner />
<div>
<Spinner />
</div>
</span>
</div>
);

View file

@ -223,7 +223,7 @@ function ModelSelect() {
ref={buttonRef}
className="h-[18px] gap-1 border-none text-gray-400"
>
<span className="line-clamp-1 hover:brightness-110">
<span className="line-clamp-1 break-all hover:brightness-110">
{modelSelectTitle(selectedChatModel) || "Select model"}
</span>
<ChevronDownIcon

View file

@ -50,6 +50,7 @@ function useSetup() {
organizations,
selectedOrgId,
} = result;
if (isInitial && hasDoneInitialConfigLoad.current) {
return;
}