File tree Expand file tree Collapse file tree
packages/ui/src/components/editor/panel/PromptField Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -408,7 +408,10 @@ export const PromptField: React.FC<PromptFieldProps> = (props) => {
408408 onDragOver = { handle_drag_over }
409409 onDragEnd = { handle_drag_end }
410410 onFocus = { ( ) => set_is_focused ( true ) }
411- onBlur = { ( ) => set_is_focused ( false ) }
411+ onBlur = { ( ) => {
412+ set_is_focused ( false )
413+ window . getSelection ( ) ?. removeAllRanges ( )
414+ } }
412415 className = { cn ( styles . input , {
413416 [ styles [ 'input--empty' ] ] : ! props . value
414417 } ) }
Original file line number Diff line number Diff line change @@ -99,13 +99,20 @@ export const get_highlighted_text = (params: {
9999 }
100100
101101 const line_count = content . split ( '\n' ) . length
102- const lines_text = line_count === 1 ? 'line' : 'lines'
102+ const lines_text = line_count == 1 ? 'line' : 'lines'
103+
104+ const is_error = ! params . context_file_paths . includes ( path )
105+
106+ const title = is_error
107+ ? 'File of the selection is not in context'
108+ : content
103109
104110 return `<span class="${ cn (
105111 styles [ 'symbol' ] ,
106- styles [ 'symbol--pasted-lines' ]
112+ styles [ 'symbol--pasted-lines' ] ,
113+ { [ styles [ 'symbol--error' ] ] : is_error }
107114 ) } " data-type="pasted-lines-symbol" title="${ escape_html (
108- content
115+ title
109116 ) } " data-path="${ escape_html ( path ) } " data-content="${ escape_html (
110117 content
111118 ) } "${ start ? ` data-start="${ escape_html ( start ) } "` : '' } ${
@@ -297,11 +304,12 @@ export const get_highlighted_text = (params: {
297304 const show_clear_button =
298305 ! ! params . text || ( params . tabs_config && params . tabs_config . count > 1 )
299306 if ( show_clear_button ) {
307+ const title = params . text ? 'Clear' : 'Close tab'
300308 header_html += `<span class="${ cn (
301309 styles [ 'clear-button' ] ,
302310 'codicon' ,
303311 'codicon-close'
304- ) } " data-role="clear-button"></span>`
312+ ) } " data-role="clear-button" title=" ${ title } " ></span>`
305313 }
306314
307315 if ( header_html ) {
You can’t perform that action at this time.
0 commit comments