-
Notifications
You must be signed in to change notification settings - Fork 3
docs(fmodata): fix intent install command #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+90
−31
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
66eb384
docs(fmodata): fix intent install command
eluce2 34e97f0
docs(fmodata): remove premature AI agent command
eluce2 7fcc337
docs: add AI agent install to quick starts
eluce2 230601b
docs: fix intent versioning and add beta tags in fmdapi quick start
eluce2 581f4cf
docs: keep sidebar pinned by removing docs max width
eluce2 a917f5b
docs(fmodata): remove single-item CLI sidebar section
eluce2 99a82ef
docs: use agent-style command block for intent install
eluce2 195ba37
docs: terminal-style AgentCommand with orange border, copy button, in…
eluce2 8c60071
docs: move CLI to Reference, use PackageInstall with global flag
eluce2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| "use client"; | ||
|
|
||
| import { CheckIcon, CopyIcon } from "lucide-react"; | ||
| import { useCallback, useState } from "react"; | ||
|
|
||
| interface AgentCommandProps { | ||
| command?: string; | ||
| label?: string; | ||
| } | ||
|
|
||
| export function AgentCommand({ | ||
| command = "npx @tanstack/intent@latest install", | ||
| label = "Tell your agent to run", | ||
| }: AgentCommandProps) { | ||
| const [copied, setCopied] = useState(false); | ||
|
|
||
| const copy = useCallback(() => { | ||
| navigator.clipboard.writeText(command); | ||
| setCopied(true); | ||
| setTimeout(() => setCopied(false), 2000); | ||
| }, [command]); | ||
|
|
||
| return ( | ||
| <div className="group relative my-4 font-mono text-sm"> | ||
| <div className="overflow-hidden rounded-lg border border-[#e87a2a] bg-[#1a1a2e]"> | ||
| <div className="flex items-center justify-between border-b border-[#e87a2a]/40 px-4 py-2"> | ||
| <span className="text-xs text-[#e87a2a]">{label}</span> | ||
| <button | ||
| type="button" | ||
| onClick={copy} | ||
| className="rounded-md p-1 text-[#7a7a9e] transition-colors hover:text-[#e0e0e0]" | ||
| aria-label="Copy command" | ||
| > | ||
| {copied ? ( | ||
| <CheckIcon className="size-4 text-green-400" /> | ||
| ) : ( | ||
| <CopyIcon className="size-4" /> | ||
| )} | ||
| </button> | ||
| </div> | ||
| <div className="px-4 py-3"> | ||
| <span className="text-[#e87a2a]">❯ </span> | ||
| <span className="text-[#e0e0e0]">{command}</span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default AgentCommand; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime error:
packageNameis optional but accessed without null check. WhenpackageNameis undefined, calling.startsWith()will throwTypeError: Cannot read property 'startsWith' of undefined.Fix by adding a null check:
Or use a guard clause:
Spotted by Graphite

Is this helpful? React 👍 or 👎 to let us know.