chore: skill content update#93
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for AntV G2, G6, and X6 skills by replacing the POST-based content retrieval endpoints with a new GET-based /api/v1/context/retrieve endpoint, updating the quick reference query tables, and adding CDN usage examples. The review feedback identifies critical issues in the newly added CDN examples, including a missing node definition and constructor inconsistency in the G6 graph example, as well as an incorrect library version and script path in the X6 editor example.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| const graph = new G6.Graph({ | ||
| container: 'container', | ||
| data: { | ||
| nodes: [{ id: 'node-1', style: { labelText: 'Node 1' } }], | ||
| edges: [{ source: 'node-1', target: 'node-2' }], | ||
| }, | ||
| layout: { type: 'force' }, | ||
| behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], | ||
| }); | ||
| graph.render(); |
There was a problem hiding this comment.
There are two issues in this CDN usage example:
- Missing Node: The
edgesarray referencesnode-2as a target, butnode-2is not defined in thenodesarray. This will cause rendering or data integrity issues in G6. - Constructor Consistency: The code uses
new G6.Graph(...), which contradicts the Critical Rule defined later in this file: "MUST: Usenew Graph({...})— NOT v4new G6.Graph()". DestructuringGraphfromG6first allows usingnew Graph(...)consistently.
| const graph = new G6.Graph({ | |
| container: 'container', | |
| data: { | |
| nodes: [{ id: 'node-1', style: { labelText: 'Node 1' } }], | |
| edges: [{ source: 'node-1', target: 'node-2' }], | |
| }, | |
| layout: { type: 'force' }, | |
| behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], | |
| }); | |
| graph.render(); | |
| const { Graph } = G6; | |
| const graph = new Graph({ | |
| container: 'container', | |
| data: { | |
| nodes: [ | |
| { id: 'node-1', style: { labelText: 'Node 1' } }, | |
| { id: 'node-2', style: { labelText: 'Node 2' } }, | |
| ], | |
| edges: [{ source: 'node-1', target: 'node-2' }], | |
| }, | |
| layout: { type: 'force' }, | |
| behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], | |
| }); | |
| graph.render(); |
| ### CDN Usage | ||
|
|
||
| ```html | ||
| <script src="https://unpkg.com/@antv/x6@2/dist/x6.js"></script> |
There was a problem hiding this comment.
This file is dedicated to X6 v3 (as indicated by the title # X6 v3 Graph Editor). However, the CDN script tag is loading @antv/x6@2 (v2) and pointing to /dist/x6.js (which was the path format for v1, whereas v2 and v3 use /dist/index.js).
To ensure compatibility with X6 v3 features and avoid loading the wrong version, the CDN URL should be updated to point to @antv/x6@3/dist/index.js.
| <script src="https://unpkg.com/@antv/x6@2/dist/x6.js"></script> | |
| <script src="https://unpkg.com/@antv/x6@3/dist/index.js"></script> |
There was a problem hiding this comment.
Pull request overview
This PR updates the AntV G2/G6/X6 skill documentation to include CDN usage snippets and to refresh the “Content Retrieval” instructions/quick-reference queries.
Changes:
- Added “CDN Usage” HTML snippets for G2, G6, and X6 SKILL docs.
- Replaced the older POST-based content-retrieval guidance with a GET-based
/api/v1/context/retrievesection and updated quick reference tables accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| skills/antv-x6-editor/SKILL.md | Adds CDN snippet and rewrites content retrieval + repositions Quick Reference table. |
| skills/antv-g6-graph/SKILL.md | Adds CDN snippet and rewrites content retrieval + repositions Quick Reference table. |
| skills/antv-g2-chart/SKILL.md | Adds CDN snippet and rewrites content retrieval + repositions Quick Reference table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <script src="https://unpkg.com/@antv/g6@5/dist/g6.min.js"></script> | ||
| <script> | ||
| const graph = new G6.Graph({ | ||
| container: 'container', | ||
| data: { | ||
| nodes: [{ id: 'node-1', style: { labelText: 'Node 1' } }], | ||
| edges: [{ source: 'node-1', target: 'node-2' }], | ||
| }, | ||
| layout: { type: 'force' }, | ||
| behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], | ||
| }); | ||
| graph.render(); | ||
| </script> |
No description provided.