commit
4e8a69ec30
5 changed files with 14 additions and 6 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ function useSetup() {
|
|||
organizations,
|
||||
selectedOrgId,
|
||||
} = result;
|
||||
|
||||
if (isInitial && hasDoneInitialConfigLoad.current) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue