File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 margin : 6px 12px ;
1414 position : relative ;
1515
16+ :global ([data-modern-ui= ' true' ] ) & {
17+ margin : 6px 10px ;
18+ }
19+
1620 & __title {
1721 position : absolute ;
1822 left : 50% ;
2832 border-top : 1px solid var (--cwc-border-color-dimmed );
2933
3034 :global ([data-modern-ui= ' true' ] ) & {
31- padding : 10px 12 px 5px 12 px ;
35+ padding : 10px 10 px 5px 10 px ;
3236 }
3337}
Original file line number Diff line number Diff line change 33 flex-direction : column ;
44 padding : 4px 0 12px 0 ;
55 gap : 8px ;
6+
7+ :global ([data-modern-ui= ' true' ] ) & {
8+ padding : 4px 0 10px 0 ;
9+ }
610}
711
812.info {
1519 border-radius : 8px ;
1620 overflow : hidden ;
1721
22+ :global ([data-modern-ui= ' true' ] ) & {
23+ margin : 0 10px ;
24+ }
25+
1826 & --error {
1927 color : var (--cwc-text-color-red );
2028 background-color : var (--cwc-bg-red );
7987 font-size : 14px ;
8088 line-height : 1.3 ;
8189 font-weight : 500 ;
90+ user-select : text ;
91+
92+ & --expanded {
93+ display : block ;
94+ -webkit-line-clamp : unset ;
95+ }
96+
97+ :global ([data-modern-ui= ' true' ] ) & {
98+ margin : 0 10px ;
99+ }
82100
83101 & --large {
84102 font-size : 16px ;
97115 padding : 7px 9px 9px 9px ;
98116 border-radius : 6px ;
99117 background-color : var (--cwc-bg-tertiary );
100- background-image : linear-gradient (
101- to right ,
102- var (--cwc-bg-secondary ),
103- var (--cwc-bg-secondary )
104- );
105- background-repeat : no-repeat ;
106- background-size : 0% 100% ;
107- animation : breathe 10s infinite linear ;
118+
119+ :global ([data-modern-ui= ' true' ] ) & {
120+ margin : 0 10px ;
121+ }
108122
109123 & __item {
110124 display : flex ;
170184 white-space : nowrap ;
171185 overflow : hidden ;
172186 text-overflow : ellipsis ;
173- }
174187
175- @keyframes breathe {
176- 0% {
177- background-size : 0% 100% ;
178- }
179- 50% {
180- background-size : 100% 100% ;
181- }
182- 100% {
183- background-size : 0% 100% ;
188+ :global ([data-modern-ui= ' true' ] ) & {
189+ margin : 4px 10px 0 10px ;
184190 }
185191}
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ export const ResponsePreview: FC<Props> = (props) => {
6161 )
6262 const [ is_fixing_all , set_is_fixing_all ] = useState ( false )
6363 const [ has_attempted_auto_fix , set_has_attempted_auto_fix ] = useState ( false )
64+ const [ instructions_expanded , set_instructions_expanded ] = useState ( false )
6465 const scroll_top_ref = useRef ( 0 )
6566 const scrollable_ref = useRef < any > ( null )
6667
@@ -228,9 +229,20 @@ export const ResponsePreview: FC<Props> = (props) => {
228229 < div
229230 className = { cn (
230231 styles . instructions ,
231- get_instructions_font_size_class ( simplified_instructions )
232+ get_instructions_font_size_class ( simplified_instructions ) ,
233+ {
234+ [ styles [ 'instructions--expanded' ] ] : instructions_expanded
235+ }
232236 ) }
233237 title = { props . raw_instructions }
238+ onClick = { ( ) => {
239+ if (
240+ typeof window !== 'undefined' &&
241+ window . getSelection ( ) ?. toString ( )
242+ )
243+ return
244+ set_instructions_expanded ( ! instructions_expanded )
245+ } }
234246 >
235247 { simplified_instructions }
236248 </ div >
Original file line number Diff line number Diff line change 3636 border-radius : 8px ;
3737 cursor : pointer ;
3838
39+ :global ([data-modern-ui= ' true' ] ) & {
40+ margin : 0 10px ;
41+ }
42+
3943 & :hover {
4044 background-color : var (--vscode-list-hoverBackground );
4145 border-color : var (--cwc-border-color );
Original file line number Diff line number Diff line change 44}
55
66.text {
7- margin : 6px 12px ;
7+ margin : 3 px 12 px 6px 12px ;
88 word-wrap : break-word ;
99 user-select : text ;
1010
11+ :global ([data-modern-ui= ' true' ] ) & {
12+ margin : 3px 10px 6px 10px ;
13+ }
14+
1115 > * {
1216 margin : 0 ;
1317 font-size : 13px ;
5559 display : flex ;
5660 align-items : center ;
5761 margin : 0 12px ;
58- padding-right : 9px ;
5962 position : relative ;
6063 cursor : pointer ;
6164
65+ :global ([data-modern-ui= ' true' ] ) & {
66+ margin : 0 10px ;
67+ }
68+
6269 & :hover {
6370 color : var (--cwc-text-color );
6471
6572 & .header__line {
66- background-color : var (--cwc-border-color ) !important ;
73+ background : linear-gradient (
74+ to right ,
75+ var (--cwc-border-color ),
76+ transparent
77+ ) !important ;
6778 }
6879 }
6980
7081 & __line {
7182 flex : 1 ;
7283 height : 1px ;
73- background-color : var (--cwc-border-color-dimmed );
74- margin : 0 10px 0 4px ;
75- }
76-
77- & __tokens {
78- font-size : 12px ;
79- color : var (--cwc-text-color-dimmed );
84+ background : linear-gradient (
85+ to right ,
86+ var (--cwc-border-color-dimmed ),
87+ transparent
88+ );
89+ margin : 0 0 0 4px ;
8090 }
8191}
Original file line number Diff line number Diff line change @@ -23,14 +23,9 @@ export const TextItem: FC<Props> = (props) => {
2323 codicon_icon = { props . is_expanded ? 'chevron-down' : 'chevron-right' }
2424 />
2525 < div className = { styles . header__line } />
26- < span className = { styles . header__tokens } >
27- { Math . floor ( props . content . length * 0.25 ) || 1 }
28- </ span >
2926 </ div >
3027 { props . is_expanded && (
31- < div
32- className = { styles . text }
33- >
28+ < div className = { styles . text } >
3429 < ReactMarkdown > { props . content } </ ReactMarkdown >
3530 < div
3631 className = { styles . text__collapse }
You can’t perform that action at this time.
0 commit comments