feat: add submodule: [web-agent] and intergate docs into doc site#82
feat: add submodule: [web-agent] and intergate docs into doc site#82chilingling wants to merge 2 commits intoopentiny:devfrom
Conversation
WalkthroughThe changes add a new Git submodule entry for "web-agent" to the repository. The Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.vitepress/config.mts:
- Line 229: The rewrite rule 'web-agent/docs/:path*': 'web-agent/guide/:path*'
is dead because the web-agent directory has no docs/ or guide/ subdirectories;
either remove this rewrite entry from the rewrites config or create the expected
structure and markdown files under web-agent/docs (or web-agent/guide) so the
mapping points to real content—update or delete the 'web-agent/docs/:path*' →
'web-agent/guide/:path*' mapping accordingly.
🧹 Nitpick comments (2)
.vitepress/theme/components/CustomHeader.vue (2)
26-26: Inline style with magic number for tab container width.The width was bumped from
810pxto980pxto fit the new tab. This is fragile — adding another product tab in the future will require another manual adjustment. Consider using a CSS approach that adapts to content (e.g.,max-widthwith flex layout). That said, this matches the existing pattern, so it's a pre-existing concern.
326-336:productPathMapentry forweb-agenthas different semantics than other entries.Other entries in
productPathMaplist only non-guide sub-paths (e.g.,"tiny-editor": ["/demo/", "/api/", "/modules/"]), so the guide tab is activated viacurrentTabmatching. Forweb-agent,"/web-agent/"matches all paths including guide, makingisProductRoutealwaystrueandactiveNavTabalways"guide". This works correctly today because there's only one tab, but the intent differs from the pattern. If more tabs are added later, this entry would need updating.
| 'tiny-editor/packages/docs/fluent-editor/docs/demo/:path*': 'tiny-editor/demo/:path*', | ||
| 'tiny-editor/packages/docs/fluent-editor/docs/api/:path*': 'tiny-editor/api/:path*', | ||
| 'tiny-editor/packages/docs/fluent-editor/docs/modules/:path*': 'tiny-editor/modules/:path*', | ||
| 'web-agent/docs/:path*': 'web-agent/guide/:path*' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the expected markdown files exist in the web-agent submodule
echo "=== Files in web-agent/docs/ ==="
fd -e md . web-agent/docs/ 2>/dev/null || echo "web-agent/docs/ not found or empty"
echo ""
echo "=== Looking for expected sidebar files ==="
for f in getting-started architecture api-reference; do
if [ -f "web-agent/docs/${f}.md" ]; then
echo "✓ web-agent/docs/${f}.md exists"
else
echo "✗ web-agent/docs/${f}.md MISSING"
fi
done
echo ""
echo "=== Checking if web-agent/guide/ exists ==="
if [ -d "web-agent/guide/" ]; then
echo "✓ web-agent/guide/ exists"
fd -e md . web-agent/guide/ 2>/dev/null | head -20 || echo "No markdown files found"
else
echo "✗ web-agent/guide/ NOT found"
fiRepository: opentiny/docs
Length of output: 369
🏁 Script executed:
#!/bin/bash
echo "=== Checking if web-agent exists ==="
if [ -d "web-agent" ]; then
echo "✓ web-agent directory exists"
echo ""
echo "=== Contents of web-agent/ ==="
ls -la web-agent/ | head -30
echo ""
echo "=== All markdown files in web-agent ==="
find web-agent -name "*.md" -type f 2>/dev/null | head -20
echo ""
echo "=== Directory structure of web-agent ==="
tree -L 3 web-agent 2>/dev/null || find web-agent -type d | head -20
else
echo "✗ web-agent directory NOT found"
echo ""
echo "=== Listing repository root ==="
ls -la | grep -E "^d"
fiRepository: opentiny/docs
Length of output: 382
Remove or fix the rewrite rule—both referenced paths don't exist.
The rewrite rule maps web-agent/docs/:path* → web-agent/guide/:path*, but the web-agent directory is empty. Neither docs/ nor guide/ subdirectories exist, and no markdown files are present. This rule will never match any requests. Either initialize the submodule with the correct structure or remove the rule entirely.
🤖 Prompt for AI Agents
In @.vitepress/config.mts at line 229, The rewrite rule 'web-agent/docs/:path*':
'web-agent/guide/:path*' is dead because the web-agent directory has no docs/ or
guide/ subdirectories; either remove this rewrite entry from the rewrites config
or create the expected structure and markdown files under web-agent/docs (or
web-agent/guide) so the mapping points to real content—update or delete the
'web-agent/docs/:path*' → 'web-agent/guide/:path*' mapping accordingly.
【描述】
Summary by CodeRabbit
New Features
UI
Chores