2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface PromptInputQuickPickItemProps {
12
12
export class PromptInputQuickPickItem {
13
13
render : ExtendedHTMLElement ;
14
14
private readonly props : PromptInputQuickPickItemProps ;
15
+
15
16
constructor ( props : PromptInputQuickPickItemProps ) {
16
17
this . props = props ;
17
18
this . render = DomBuilder . getInstance ( ) . build ( {
@@ -52,7 +53,13 @@ export class PromptInputQuickPickItem {
52
53
? [ {
53
54
type : 'div' ,
54
55
classNames : [ 'mynah-chat-command-selector-command-description' ] ,
55
- children : [ this . props . quickPickItem . description ]
56
+ children : [ {
57
+ type : 'span' ,
58
+ children : [ this . props . quickPickItem . description . slice ( 0 , Math . ceil ( this . props . quickPickItem . description . length / 2 ) ) ]
59
+ } , {
60
+ type : 'span' ,
61
+ children : [ this . props . quickPickItem . description . slice ( Math . ceil ( this . props . quickPickItem . description . length / 2 ) ) ]
62
+ } ]
56
63
} ]
57
64
: [ ] ) ,
58
65
...( ( this . props . quickPickItem . children != null ) && this . props . quickPickItem . children . length > 0
Original file line number Diff line number Diff line change 123
123
grid-row : 2 ;
124
124
grid-column : 2 ;
125
125
color : var (--mynah-color-text-weak );
126
+ display : flex ;
127
+ width : 100% ;
128
+ overflow : hidden ;
129
+ justify-content : flex-start ;
130
+
131
+ > span :first-child {
132
+ overflow : hidden ;
133
+ text-overflow : ellipsis ;
134
+ white-space : pre ;
135
+ flex : 0 1 auto ;
136
+ text-align : left ;
137
+ }
138
+
139
+ > span :last-child {
140
+ flex : 0 1 auto ;
141
+ white-space : pre ;
142
+ overflow : hidden ;
143
+ display : inline-flex ;
144
+ flex-flow : row nowrap ;
145
+ justify-content : flex-end ;
146
+ }
126
147
}
127
148
}
128
149
}
0 commit comments