Skip to content

Commit aedb476

Browse files
committed
fix: lint — css specificity order and stable console keys
1 parent 35bf915 commit aedb476

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

app/globals.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,6 @@ textarea:focus-visible {
396396
@apply min-w-[3rem] text-muted-foreground/40 text-[11px]!;
397397
}
398398

399-
.cm-gutter.cm-lineNumbers .cm-gutterElement {
400-
padding-right: 12px !important;
401-
}
402-
403399
.cm-scroller {
404400
@apply overflow-auto!;
405401
}
@@ -433,6 +429,10 @@ textarea:focus-visible {
433429
opacity: 0.7;
434430
}
435431

432+
.cm-gutter.cm-lineNumbers .cm-gutterElement {
433+
padding-right: 12px !important;
434+
}
435+
436436
.cm-foldGutter {
437437
@apply min-w-3;
438438
}

components/chat/console.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,11 @@ export function Console({ consoleOutputs, setConsoleOutputs }: ConsoleProps) {
160160
</div>
161161
) : (
162162
<div className="no-scrollbar flex w-full min-w-0 flex-col gap-2 overflow-x-auto text-foreground">
163-
{consoleOutput.contents.map((content, index) =>
163+
{consoleOutput.contents.map((content) =>
164164
content.type === "image" ? (
165-
<picture key={`${consoleOutput.id}-${index}`}>
165+
<picture
166+
key={`${consoleOutput.id}-img-${content.value.slice(0, 32)}`}
167+
>
166168
<img
167169
alt="output"
168170
className="max-w-full rounded-md"
@@ -172,7 +174,7 @@ export function Console({ consoleOutputs, setConsoleOutputs }: ConsoleProps) {
172174
) : (
173175
<div
174176
className="w-full whitespace-pre-line break-words"
175-
key={`${consoleOutput.id}-${index}`}
177+
key={`${consoleOutput.id}-txt-${content.value.slice(0, 32)}`}
176178
>
177179
{content.value}
178180
</div>

0 commit comments

Comments
 (0)