ag-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBe aware of the AG products in use, and their versions and wrapper framework
注意当前使用的AG产品及其版本和包装框架
Products in use may be obvious from the context, if not it can be determined from the package that features are imported from:
- packages start @ag-grid- or ag-grid-
grid - packages start ag-charts-
charts - package is ag-studio or starts ag-studio-
studio
{product} below refers to grid, charts or studio.
Versions can be determined from project's package.json or by reading the installed library's package.json inside node_modules
Framework is , , if using those frameworks, for Vanilla JS apps or for apps on any other framework (e.g. Svelte, Solid).
reactvueangularjavascript从上下文通常可以看出正在使用的产品,如果无法直接看出,可以从功能导入的包来判断:
- 包以 @ag-grid- 或 ag-grid- 开头
grid - 包以 ag-charts- 开头
charts - 包为 ag-studio 或以 ag-studio- 开头
studio
下文的 {product} 指的是 grid、charts 或 studio。
版本可以从项目的 package.json 或 node_modules 中已安装库的 package.json 查看。
如果使用了对应框架,框架为 、、;对于原生JS应用或其他框架(如Svelte、Solid)的应用,框架为 。
reactvueangularjavascriptFor package version updates, use the ag-update skill
如需更新包版本,请使用 ag-update 技能
This skill ships with a sibling skill, "ag-update". Delegate to it when asked to update grid, charts or studio packages.
本技能附带一个配套技能“ag-update”。当被要求更新grid、charts或studio包时,请委托该技能处理。
Don't guess
不要猜测
Whenever writing code, you must have a clear source for the APIs you use, whether that's following existing patterns, instructions from the user or consulting our docs. If you're unsure, do research to ground your actions.
编写代码时,你必须明确所使用API的来源,无论是遵循现有模式、用户的指示还是查阅我们的文档。如果不确定,请先调研再行动。
By default consult the docs
默认情况下查阅文档
When writing code you will encounter two problems:
- Your training data contains many deprecated and removed APIs and package names and may not have newer APIs.
- APIs have non-obvious edge cases and interactions with other features.
The solution to both of these is to consult the documentation.
If it is clear exactly what API to use, eg you are following a detailed plan that names specific APIs, or there are other examples in the codebase to copy, you may write code directly.
Otherwise if there is uncertainty, check the docs. To find the correct docs URL for the version in use, load and follow the instructions in that file.
references/{product}/documentation-index.mdLocate the feature you are working with in the docs and read surrounding paragraphs to get information on edge cases and interactions. If many docs pages seem potentially relevant, consider getting a sub-agent to read them all and extract information relevant to the task.
编写代码时你会遇到两个问题:
- 你的训练数据包含许多已弃用和移除的API及包名,可能没有包含较新的API。
- API存在不明显的边缘情况以及与其他功能的交互问题。
解决这两个问题的方法是查阅文档。
如果明确知道要使用哪个API,例如你正在遵循一个指定了具体API的详细计划,或者代码库中有可复制的示例,那么可以直接编写代码。
否则,如果存在不确定性,请查阅文档。要找到对应版本的正确文档URL,请加载 并按照该文件中的说明操作。
references/{product}/documentation-index.md在文档中找到你正在处理的功能,阅读相关段落以了解边缘情况和交互信息。如果多个文档页面似乎都相关,可以考虑让子代理读取所有页面并提取与任务相关的信息。
Load product-specific recommendations
加载产品特定建议
references/{product}/recommendations.mdreferences/{product}/recommendations.md