Conversation
WalkthroughThis pull request enhances the doc-ai application by extending the TinyRemoter component with additional props (genUiAble, fullscreen, systemPrompt), updates product guide skill documentation with new references and a price protection feature article, modifies API endpoint configuration, and adjusts configuration settings for the DeepSeek model. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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
🧹 Nitpick comments (2)
packages/next-remoter/src/config/genui-config.ts (1)
3-5: Consider adding a comment explaining the prompt ID reference.The prompt ID
53e8f602ffc54527192aabd17465442eis a magic string. Adding a brief comment about what this ID references (e.g., which prompt template version or purpose) would improve maintainability.📝 Suggested improvement
'prompt': { strategy: 'append', + // Prompt template for genUI schema generation (v2 - supports customActions) 'id': '53e8f602ffc54527192aabd17465442e',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/next-remoter/src/config/genui-config.ts` around lines 3 - 5, Add a short inline comment next to the 'prompt' object's 'id' property that explains what the magic string "53e8f602ffc54527192aabd17465442e" refers to (for example: which prompt template/version or its purpose), so maintainers can understand why this specific ID is used; update the 'prompt' object in genui-config.ts near the 'id' key to include that explanatory comment.packages/doc-ai/src/App.vue (1)
27-27: Consider extracting the hardcoded prompt to a named constant.The
systemPromptis defined inline with a specific instruction. For maintainability and clarity, consider extracting this to a constant with a descriptive name.✨ Suggested refactor
+const DEFAULT_SYSTEM_PROMPT = '要求:<important>输出格式为 Markdown 格式,不要使用schemaJson格式</important>' + -const systemPrompt = ref('要求:<important>输出格式为 Markdown 格式,不要使用schemaJson格式</important>') +const systemPrompt = ref(DEFAULT_SYSTEM_PROMPT)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/doc-ai/src/App.vue` at line 27, Extract the hardcoded string used to initialize systemPrompt into a named top-level constant (e.g., DEFAULT_SYSTEM_PROMPT) and use that constant when creating the ref; specifically, create a descriptive constant for the prompt near the top of the file and replace const systemPrompt = ref('要求:<important>输出格式为 Markdown 格式,不要使用schemaJson格式</important>') with const systemPrompt = ref(DEFAULT_SYSTEM_PROMPT) (or import the constant if you move it to a separate module) so the prompt is easy to find and reuse; ensure the constant name clearly indicates its purpose (like DEFAULT_SYSTEM_PROMPT or SYSTEM_PROMPT_TEMPLATE) and update any tests or usages accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/doc-ai/src/skills/product-guide/SKILL.md`:
- Around line 12-13: Update the incorrect relative paths in SKILL.md so they
point to the existing reference directory; replace
'./product-guide/reference/product-listing.md' with
'./reference/product-listing.md' and
'./product-guide/reference/product-price-protection.md' with
'./reference/product-price-protection.md' (edit the path strings shown in the
two lines mentioning 商品上架管理 and 商品价保管理).
---
Nitpick comments:
In `@packages/doc-ai/src/App.vue`:
- Line 27: Extract the hardcoded string used to initialize systemPrompt into a
named top-level constant (e.g., DEFAULT_SYSTEM_PROMPT) and use that constant
when creating the ref; specifically, create a descriptive constant for the
prompt near the top of the file and replace const systemPrompt =
ref('要求:<important>输出格式为 Markdown 格式,不要使用schemaJson格式</important>') with const
systemPrompt = ref(DEFAULT_SYSTEM_PROMPT) (or import the constant if you move it
to a separate module) so the prompt is easy to find and reuse; ensure the
constant name clearly indicates its purpose (like DEFAULT_SYSTEM_PROMPT or
SYSTEM_PROMPT_TEMPLATE) and update any tests or usages accordingly.
In `@packages/next-remoter/src/config/genui-config.ts`:
- Around line 3-5: Add a short inline comment next to the 'prompt' object's 'id'
property that explains what the magic string "53e8f602ffc54527192aabd17465442e"
refers to (for example: which prompt template/version or its purpose), so
maintainers can understand why this specific ID is used; update the 'prompt'
object in genui-config.ts near the 'id' key to include that explanatory comment.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/doc-ai/src/App.vuepackages/doc-ai/src/skills/product-guide/SKILL.mdpackages/doc-ai/src/skills/product-guide/reference/product-listing.mdpackages/doc-ai/src/skills/product-guide/reference/product-price-protection.mdpackages/next-remoter/src/composable/CustomAgentModelProvider.tspackages/next-remoter/src/config/genui-config.ts
| 商品上架管理: 具体的商品上架参考文档'./product-guide/reference/product-listing.md' | ||
| 商品价保管理: 具体的商品价保参考文档'./product-guide/reference/product-price-protection.md' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the referenced files exist at the expected paths relative to SKILL.md
echo "Checking SKILL.md location..."
find packages/doc-ai/src/skills/product-guide/ -name "SKILL.md" -type f
echo ""
echo "Checking if referenced files exist..."
find packages/doc-ai/src/skills/product-guide/ -name "product-listing.md" -type f
find packages/doc-ai/src/skills/product-guide/ -name "product-price-protection.md" -type f
echo ""
echo "Full directory structure:"
find packages/doc-ai/src/skills/product-guide/ -type f -name "*.md" | sort
echo ""
echo "Checking if paths exist relative to SKILL.md location..."
ls -la packages/doc-ai/src/skills/product-guide/product-guide/reference/product-listing.md 2>&1 || echo "Path not found"
ls -la packages/doc-ai/src/skills/product-guide/product-guide/reference/product-price-protection.md 2>&1 || echo "Path not found"
echo ""
echo "Checking alternative path resolution (one level up)..."
ls -la packages/doc-ai/src/skills/product-guide/reference/product-listing.md 2>&1 || echo "Path not found"
ls -la packages/doc-ai/src/skills/product-guide/reference/product-price-protection.md 2>&1 || echo "Path not found"Repository: opentiny/next-sdk
Length of output: 1216
Fix incorrect relative paths for skill document references.
The paths in lines 12-13 are incorrect. The files exist at packages/doc-ai/src/skills/product-guide/reference/, but the current paths './product-guide/reference/product-listing.md' and './product-guide/reference/product-price-protection.md' include an extra product-guide directory level that causes them to fail resolution.
Update the paths to:
'./reference/product-listing.md''./reference/product-price-protection.md'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/doc-ai/src/skills/product-guide/SKILL.md` around lines 12 - 13,
Update the incorrect relative paths in SKILL.md so they point to the existing
reference directory; replace './product-guide/reference/product-listing.md' with
'./reference/product-listing.md' and
'./product-guide/reference/product-price-protection.md' with
'./reference/product-price-protection.md' (edit the path strings shown in the
two lines mentioning 商品上架管理 and 商品价保管理).
Pull Request (OpenTiny NEXT-SDKs)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Documentation
Chores