Skip to content

Commit 652dd61

Browse files
committed
Lint / format fixes
1 parent ed31a58 commit 652dd61

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

apps/docs/content/components/(chatbot)/conversation.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ const markdown = messagesToMarkdown(messages);
282282
// With custom formatter
283283
const customMarkdown = messagesToMarkdown(
284284
messages,
285-
(msg, i) => `[${msg.role}]: ${msg.parts.filter(p => p.type === "text").map(p => p.text).join("")}`
285+
(msg, i) =>
286+
`[${msg.role}]: ${msg.parts
287+
.filter((p) => p.type === "text")
288+
.map((p) => p.text)
289+
.join("")}`
286290
);
287291
```

packages/elements/__tests__/jsx-preview.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ describe("jSXPreview streaming mode", () => {
252252

253253
it("strips incomplete opening tag with partial attribute", () => {
254254
render(
255-
<JSXPreview
256-
isStreaming
257-
jsx='<div><p>Done</p><span className="incomp'
258-
>
255+
<JSXPreview isStreaming jsx='<div><p>Done</p><span className="incomp'>
259256
<JSXPreviewContent />
260257
</JSXPreview>
261258
);

packages/elements/src/jsx-preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const JSXPreview = memo(
144144
}: JSXPreviewProps) => {
145145
const [prevJsx, setPrevJsx] = useState(jsx);
146146
const [error, setError] = useState<Error | null>(null);
147-
const [lastGoodJsx, setLastGoodJsx] = useState("");
147+
const [_lastGoodJsx, setLastGoodJsx] = useState("");
148148

149149
// Clear error when jsx changes (derived state pattern)
150150
if (jsx !== prevJsx) {

0 commit comments

Comments
 (0)