Skip to content

Commit df72658

Browse files
committed
Change symbol warning style to error style for images and pasted lines
- use red color instead of yellow for faulty symbols - [Changes] also rename to --error ├── .gitignore └── packages └── ui └── src ├── components │ └── editor │ └── common │ └── prompts │ ├── PromptField │ │ ├── PromptField.module.scss │ │ ├── PromptField.stories.tsx │ │ ├── PromptField.tsx │ │ ├── hooks │ │ │ ├── use-drag-drop.ts │ │ │ ├── use-dropdown.ts │ │ │ ├── use-ghost-text.ts │ │ │ ├── use-handlers │ │ │ │ ├── handle-copy.ts │ │ │ │ ├── handle-cut.ts │ │ │ │ ├── handle-input-change.ts │ │ │ │ ├── handle-input-click.ts │ │ │ │ ├── handle-key-down.ts │ │ │ │ ├── handle-paste.ts │ │ │ │ ├── handle-submit.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ ├── use-handlers.ts │ │ │ │ └── utils.ts │ │ │ └── use-keyboard-shortcuts.ts │ │ └── index.ts │ ├── Template │ │ ├── Template.module.scss │ │ ├── Template.tsx │ │ └── index.ts │ └── shared │ └── symbols │ ├── caret.ts │ ├── get-highlighted-text.tsx │ ├── index.ts │ ├── position-mapping.ts │ ├── prompt-symbols.module.scss │ ├── reconstruct-raw-value.ts │ └── use-symbol-deletion.ts └── styles └── foundation └── _colors.scss
1 parent c653e9c commit df72658

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/ui/src/components/editor/common/prompts/shared/symbols/get-highlighted-text.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const get_highlighted_text = (params: {
9797
return `<span class="${cn(
9898
styles['symbol'],
9999
styles['symbol--pasted-lines'],
100-
{ [styles['symbol--warning']]: is_warning }
100+
{ [styles['symbol--error']]: is_warning }
101101
)}" data-type="pasted-lines-symbol"${
102102
is_warning ? ' title="File with selection is not selected"' : ''
103103
} data-path="${escape_html(path)}" data-start-line="${start_line}" data-start-col="${start_col}" data-end-line="${end_line}" data-end-col="${end_col}"><span class="${
@@ -193,7 +193,7 @@ export const get_highlighted_text = (params: {
193193
const hash = image_match[1]
194194
const is_warning = params.is_web_target
195195
return `<span class="${cn(styles['symbol'], styles['symbol--image'], {
196-
[styles['symbol--warning']]: is_warning
196+
[styles['symbol--error']]: is_warning
197197
})}" data-type="image-symbol" data-hash="${hash}"${
198198
is_warning
199199
? ' title="The prompt autofill feature can\'t handle images.\nUpload in chatbot or use API with a multimodal model."'

‎packages/ui/src/components/editor/common/prompts/shared/symbols/prompt-symbols.module.scss‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,26 +188,26 @@
188188
}
189189
}
190190

191-
&--warning {
191+
&--error {
192192
background-color: color-mix(
193193
in srgb,
194-
var(--vscode-charts-yellow) 30%,
194+
var(--vscode-charts-red) 30%,
195195
transparent
196196
);
197197
}
198198

199-
&--warning &__icon:hover {
199+
&--error &__icon:hover {
200200
background-color: color-mix(
201201
in srgb,
202-
var(--vscode-charts-yellow) 40%,
202+
var(--vscode-charts-red) 40%,
203203
transparent
204204
);
205205
}
206206

207-
&--warning &__text:hover {
207+
&--error &__text:hover {
208208
background-color: color-mix(
209209
in srgb,
210-
var(--vscode-charts-yellow) 40%,
210+
var(--vscode-charts-red) 40%,
211211
transparent
212212
);
213213
}

0 commit comments

Comments
 (0)