-
Notifications
You must be signed in to change notification settings - Fork 15
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
docs: remove toc from first tool guide and add unique ids to markdown headers #580
docs: remove toc from first tool guide and add unique ids to markdown headers #580
Conversation
|
||
```text | ||
> **Note:** `*` is a wild card pattern that applies the metadata to all Tools in a `tool.gpt`. |
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.
There is a "callout" for things like this.
> **Note:** `*` is a wild card pattern that applies the metadata to all Tools in a `tool.gpt`. | |
:::note | |
`*` is a wild card pattern that applies the metadata to all Tools in a `tool.gpt`. | |
::: |
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.
Is this valid markdown, or is it mdx
? These files are automatically fetched at build time from the example repos; in this case https://github.com/otto8-ai/python-hash-tool/blob/main/README.md, so it's nice to stick to GitHub compatible markdown if we can.
![Search For Newly Added Tools](https://raw.githubusercontent.com/otto8-ai/python-hash-tool/refs/heads/main/docs/add-tools-step-3.png "Search For Newly Added Tools") | ||
|
||
### Using The `Hash` Tool in an Agent | ||
1. <details> |
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.
Curious why we need HTML instead of Markdown?
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.
HTML gives us better control the size and position of the images in this document. In this case I'm also using <details>
to keep them hidden until the user clicks on the step, greatly reducing visual clutter.
If there's a better way to do this without HTML, I'm all ears.
const FILE_URLS = [ | ||
'https://raw.githubusercontent.com/otto8-ai/python-hash-tool/main/README.md', | ||
'https://raw.githubusercontent.com/njhale/python-hash-tool/main/README.md', |
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.
Is this an expected change?
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.
nope! this was leftover from testing, thank you for catching that.
@@ -62,6 +64,25 @@ async function fetchFiles(outputDir: string) { | |||
); | |||
} | |||
|
|||
// Function to add unique IDs to Markdown headers | |||
function addUniqueHeaderIds(url, markdown: string): string { |
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.
Why is this necessary? Can we just add the IDs directly?
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.
fd65a71
to
2bdfb49
Compare
headers - The default table of contents is incompatible with tabs, so remove it from the first-tool guide - Auto-generated IDs for markdown headers in the first-tool page aren't unique, so generate unique IDs and inject them at snippet fetch time - Re-fetch latest README.md files from `*-hash-tool` repos to fix guide doc formatting issues Signed-off-by: Nick Hale <[email protected]>
2bdfb49
to
c7b97db
Compare
from the first-tool guide
unique, so generate unique IDs and inject them at snippet fetch time
*-hash-tool
repos to fixguide doc formatting issues