Download web/src/intelligence/PromptView.tsx from fsanyoto/loopable: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/intelligence/PromptView.tsx
- Command line
-
hf download hf://spaces/fsanyoto/loopable/web/src/intelligence/PromptView.tsx
-
curl -L -o PromptView.tsx https://huggingface.co/spaces/fsanyoto/loopable/resolve/main/web/src/intelligence/PromptView.tsx
828 Bytes
| import { useId } from "react"; | |
| import type { ReactNode } from "react"; | |
| import type { IntelligenceTool } from "./intelligenceApi"; | |
| export default function PromptView({ tools, children }: { tools: IntelligenceTool[]; children: ReactNode }) { | |
| const toolsId = useId(); | |
| return <div className="intelligence-prompt" data-testid="intelligence-prompt"> | |
| {children} | |
| <section className="intelligence-prompt-tools" aria-labelledby={toolsId}> | |
| <h3 id={toolsId}>Tools</h3> | |
| {tools.length ? <ul aria-label="Prompt tools" data-testid="intelligence-prompt-tools"> | |
| {tools.map((tool) => <li key={tool.name}><span className="intelligence-tool-name">{tool.name}</span> | |
| <span className="intelligence-tool-description">{tool.description}</span></li>)} | |
| </ul> : <p>No tools.</p>} | |
| </section> | |
| </div>; | |
| } | |