File tree 5 files changed +14
-6
lines changed
markdown/StepContainerPreToolbar 5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,18 @@ export function ctxItemToRifWithContents(
34
34
) : RangeInFileWithContents {
35
35
let startLine = 0 ;
36
36
let endLine = 0 ;
37
+ let adjustLines = linesOffByOne ? 1 : 0 ;
37
38
38
39
const nameSplit = item . name . split ( "(" ) ;
39
40
40
41
if ( nameSplit . length > 1 ) {
41
42
const lines = nameSplit [ 1 ] . split ( ")" ) [ 0 ] . split ( "-" ) ;
42
- startLine = Number . parseInt ( lines [ 0 ] , 10 ) - ( linesOffByOne ? 1 : 0 ) ;
43
- endLine = Number . parseInt ( lines [ 1 ] , 10 ) - ( linesOffByOne ? 1 : 0 ) ;
43
+ startLine = Number . parseInt ( lines [ 0 ] , 10 ) ;
44
+ if ( startLine === 0 ) {
45
+ adjustLines = 0 ; // safety to make sure doesn't go negative
46
+ }
47
+ startLine -= adjustLines ;
48
+ endLine = Number . parseInt ( lines [ 1 ] , 10 ) - adjustLines ;
44
49
}
45
50
46
51
const rif : RangeInFileWithContents = {
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function ContextItemsPeekItem({ contextItem }: ContextItemsPeekItemProps) {
42
42
const isRangeInFile = name . includes ( " (" ) && name . endsWith ( ")" ) ;
43
43
44
44
if ( isRangeInFile ) {
45
- const rif = ctxItemToRifWithContents ( contextItem ) ;
45
+ const rif = ctxItemToRifWithContents ( contextItem , true ) ;
46
46
ideMessenger . ide . showLines (
47
47
rif . filepath ,
48
48
rif . range . start . line ,
Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ export default function ApplyActions(props: ApplyActionsProps) {
52
52
case "streaming" :
53
53
return (
54
54
< div className = "flex items-center rounded bg-zinc-700 pl-2 pr-1" >
55
- < span className = "inline-flex items-center gap-2 text-xs text-gray-400" >
55
+ < span className = "inline-flex w-min items-center gap-2 text-center text-xs text-gray-400" >
56
56
Applying changes
57
- < Spinner />
57
+ < div >
58
+ < Spinner />
59
+ </ div >
58
60
</ span >
59
61
</ div >
60
62
) ;
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ function ModelSelect() {
223
223
ref = { buttonRef }
224
224
className = "h-[18px] gap-1 border-none text-gray-400"
225
225
>
226
- < span className = "line-clamp-1 hover:brightness-110" >
226
+ < span className = "line-clamp-1 break-all hover:brightness-110" >
227
227
{ modelSelectTitle ( selectedChatModel ) || "Select model" }
228
228
</ span >
229
229
< ChevronDownIcon
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ function useSetup() {
50
50
organizations,
51
51
selectedOrgId,
52
52
} = result ;
53
+
53
54
if ( isInitial && hasDoneInitialConfigLoad . current ) {
54
55
return ;
55
56
}
You can’t perform that action at this time.
0 commit comments