Skip to content

Commit 1dbfee7

Browse files
committed
Add RUST_RELATED_DOCS with 18 keyword categories for Rust SDK docs
1 parent 7cf6584 commit 1dbfee7

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

praisonai_tools/docs_generator/generator.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,79 @@ def friendly_title(name: str, page_type: str = "class") -> str:
572572
],
573573
}
574574

575+
# Rust SDK links to Rust-specific docs
576+
RUST_RELATED_DOCS = {
577+
"agent": [
578+
("Rust Overview", "/docs/rust/overview", "book-open"),
579+
("Rust Quickstart", "/docs/rust/quickstart", "rocket"),
580+
("Rust Agent Guide", "/docs/rust/agent", "robot"),
581+
("Rust Installation", "/docs/rust/installation", "download"),
582+
],
583+
"tool": [
584+
("Rust Tools", "/docs/rust/tools", "wrench"),
585+
("Rust Overview", "/docs/rust/overview", "book-open"),
586+
],
587+
"memory": [
588+
("Rust Memory", "/docs/rust/memory", "database"),
589+
("Rust Session", "/docs/rust/session", "clock"),
590+
],
591+
"workflow": [
592+
("Rust Agent Flow", "/docs/rust/agent-flow", "diagram-project"),
593+
("Rust Agent Team", "/docs/rust/agent-team", "users"),
594+
],
595+
"team": [
596+
("Rust Agent Team", "/docs/rust/agent-team", "users"),
597+
],
598+
"flow": [
599+
("Rust Agent Flow", "/docs/rust/agent-flow", "diagram-project"),
600+
],
601+
"task": [
602+
("Rust Tasks", "/docs/rust/tasks", "list-check"),
603+
],
604+
"hook": [
605+
("Rust Hooks", "/docs/rust/hooks", "anchor"),
606+
],
607+
"guardrail": [
608+
("Rust Guardrails", "/docs/rust/guardrails", "shield"),
609+
],
610+
"guard": [
611+
("Rust Guardrails", "/docs/rust/guardrails", "shield"),
612+
],
613+
"mcp": [
614+
("Rust MCP", "/docs/rust/mcp", "plug"),
615+
],
616+
"llm": [
617+
("Rust LLM Providers", "/docs/rust/llm-providers", "microchip"),
618+
],
619+
"provider": [
620+
("Rust LLM Providers", "/docs/rust/llm-providers", "microchip"),
621+
],
622+
"context": [
623+
("Rust Context", "/docs/rust/context", "layer-group"),
624+
],
625+
"handoff": [
626+
("Rust Handoffs", "/docs/rust/handoffs", "arrow-right-arrow-left"),
627+
],
628+
"streaming": [
629+
("Rust Streaming", "/docs/rust/streaming", "wave-square"),
630+
],
631+
"trace": [
632+
("Rust Tracing", "/docs/rust/tracing", "chart-line"),
633+
],
634+
"telemetry": [
635+
("Rust Tracing", "/docs/rust/tracing", "chart-line"),
636+
],
637+
"config": [
638+
("Rust Configuration", "/docs/rust/configuration", "gear"),
639+
],
640+
"cli": [
641+
("Rust CLI Guide", "/docs/rust/cli", "terminal"),
642+
],
643+
"command": [
644+
("Rust CLI Guide", "/docs/rust/cli", "terminal"),
645+
],
646+
}
647+
575648

576649
def get_related_docs(name: str, max_items: int = 5, package: str = "python") -> list:
577650
"""Find related documentation based on keywords in the name.
@@ -591,6 +664,8 @@ def get_related_docs(name: str, max_items: int = 5, package: str = "python") ->
591664
# Select the appropriate mapping based on package
592665
if package == "typescript":
593666
docs_map = TYPESCRIPT_RELATED_DOCS
667+
elif package == "rust":
668+
docs_map = RUST_RELATED_DOCS
594669
else:
595670
docs_map = RELATED_DOCS # Python packages use the main mapping
596671

0 commit comments

Comments
 (0)