Skip to content

Commit

Permalink
www: Fix homepage demo glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgill committed Jun 2, 2024
1 parent 2ee3725 commit d059e74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/www/src/components/examples/Example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { codeBlockBlock } from "./CodeBlock";
import { Controls } from "./Controls";
import { Markdown } from "./Markdown";
import { NeverShrinkContainer } from "./NeverShrinkContainer";
import { defaultExampleProbs } from "./contants";
import { defaultExampleProbs } from "./constants";
import { getThrottle, type ThrottleType } from "./throttle";
import type { Tab } from "./types";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ export const defaultExampleProbs: ProbabilityOptions = {
delayMsProbabilities: [{ delayMs: 90, prob: 1 }],
tokenCharsProbabilities: [{ tokenChars: 3, prob: 1 }],
};

export const HIDDEN_CHAR = "‎";
4 changes: 2 additions & 2 deletions apps/www/src/components/examples/examples.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { jsonBlockPrompt } from "@llm-ui/json";
import { stringToTokenArray, type TokenWithDelay } from "@llm-ui/react";
import { buttonsSchema } from "./buttonsSchema";
import { defaultExampleProbs } from "./contants";
import { HIDDEN_CHAR, defaultExampleProbs } from "./constants";

const ctaBeforePause = `# llm-ui
Expand All @@ -19,7 +19,7 @@ Lets add a custom button:
This works by prompting the LLM to let it know it can use buttons by replying like this:
\`\`\`plain
【{type:"buttons",buttons:[{text:"Star ⭐"}, {text:"Confetti 🎉"}]}】
【{type:"${HIDDEN_CHAR}buttons",buttons:[{text:"Star ⭐"}, {text:"Confetti 🎉"}]}】
\`\`\`
^^^ llm-ui also has code blocks with syntax highlighting for over 100 languages with [Shiki](https://shiki.style/).
Expand Down

0 comments on commit d059e74

Please sign in to comment.