@vc-shell/vc-app-skill 2.0.6-pr235.6e1a779 → 2.0.7-pr236.b5ecb25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/VERSION +1 -1
- package/runtime/knowledge/docs/_BUILD_HASH.md +1 -1
- package/runtime/knowledge/docs/core/composables/useAssetsManager/useAssetsManager.docs.md +2 -0
- package/runtime/knowledge/docs/core/composables/useLanguages/useLanguages.docs.md +8 -8
- package/runtime/knowledge/docs/core/plugins/ai-agent/ai-agent.docs.md +7 -25
- package/runtime/knowledge/docs/core/plugins/extension-points/extension-points.docs.md +2 -4
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/composables/table-composables.docs.md +2 -2
- package/runtime/knowledge/docs/ui/components/organisms/vc-data-table/vc-data-table.docs.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/vc-app-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-pr236.b5ecb25",
|
|
4
4
|
"description": "AI coding skill for scaffolding and generating VirtoCommerce Shell applications. Works with Claude Code, OpenCode, Gemini, Codex, Cursor.",
|
|
5
5
|
"bin": "./bin/install.cjs",
|
|
6
6
|
"files": [
|
package/runtime/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.
|
|
1
|
+
2.0.7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Synced from framework at commit
|
|
1
|
+
Synced from framework at commit 1fb1bd541 on 2026-06-04T07:51:39.317Z
|
|
@@ -136,6 +136,8 @@ The composable holds an **internal ref** (`_items`) that is the source of truth
|
|
|
136
136
|
|
|
137
137
|
This two-way sync avoids reactivity issues when the source is a `WritableComputed` wrapping deeply nested properties (e.g., `item.value.productData.assets`).
|
|
138
138
|
|
|
139
|
+
**`sortOrder` normalization:** items entering from the source are ordered by their current `sortOrder` (items without one stay stable at the end) and reassigned a clean sequential `sortOrder` (`0..n`). This guarantees every item carries a `sortOrder` for display and reordering even when the source provides them without one. The normalization is idempotent, so it does not loop on the `_sync()` writeback.
|
|
140
|
+
|
|
139
141
|
## Types
|
|
140
142
|
|
|
141
143
|
### `AssetLike`
|
|
@@ -62,14 +62,14 @@ None.
|
|
|
62
62
|
|
|
63
63
|
### Returns (`ILanguageService`)
|
|
64
64
|
|
|
65
|
-
| Property / Method | Type | Description
|
|
66
|
-
| ------------------------ | -------------------------------------------- |
|
|
67
|
-
| `currentLocale` | `ComputedRef<string>` | The currently active locale code (e.g., `"en-US"`, `"de-DE"`).
|
|
68
|
-
| `setLocale` | `(locale: string) => void` | Switches the application locale. This updates `vue-i18n`'s locale and triggers re-rendering of all translated text.
|
|
69
|
-
| `getLocaleByTag` | `(localeTag: string) => string \| undefined` | Resolves a locale tag to its display
|
|
70
|
-
| `resolveCamelCaseLocale` | `(locale: string) => string` | Converts a locale code to camelCase format (e.g., `"en-US"` to `"enUs"`). Useful for dynamic property access on objects keyed by locale.
|
|
71
|
-
| `getFlag` | `(language: string) => Promise<string>` | Fetches a flag image URL for the given language/locale. Returns a promise because flags may be loaded lazily.
|
|
72
|
-
| `getCountryCode` | `(language: string) => string` | Extracts the country code from a language tag (e.g., `"en-US"` to `"US"`, `"de-DE"` to `"DE"`).
|
|
65
|
+
| Property / Method | Type | Description |
|
|
66
|
+
| ------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `currentLocale` | `ComputedRef<string>` | The currently active locale code (e.g., `"en-US"`, `"de-DE"`). |
|
|
68
|
+
| `setLocale` | `(locale: string) => void` | Switches the application locale. This updates `vue-i18n`'s locale and triggers re-rendering of all translated text. |
|
|
69
|
+
| `getLocaleByTag` | `(localeTag: string) => string \| undefined` | Resolves a locale tag to its native display name. Regional tags stay distinct (e.g., `"en-US"` → `"American English"`, `"en-GB"` → `"British English"`); plain codes resolve to the base native name (`"fr"` → `"Français"`). Returns `undefined` if the tag is not recognized. |
|
|
70
|
+
| `resolveCamelCaseLocale` | `(locale: string) => string` | Converts a locale code to camelCase format (e.g., `"en-US"` to `"enUs"`). Useful for dynamic property access on objects keyed by locale. |
|
|
71
|
+
| `getFlag` | `(language: string) => Promise<string>` | Fetches a flag image URL for the given language/locale. Returns a promise because flags may be loaded lazily. |
|
|
72
|
+
| `getCountryCode` | `(language: string) => string` | Extracts the country code from a language tag (e.g., `"en-US"` to `"US"`, `"de-DE"` to `"DE"`). |
|
|
73
73
|
|
|
74
74
|
### Additional Exports
|
|
75
75
|
|
|
@@ -7,16 +7,15 @@ slug: ai-agent
|
|
|
7
7
|
|
|
8
8
|
# AI Agent Plugin
|
|
9
9
|
|
|
10
|
-
Integrates an AI assistant panel (chatbot iframe) into the vc-shell application. Provides blade-aware context passing
|
|
10
|
+
Integrates an AI assistant panel (chatbot iframe) into the vc-shell application. Provides blade-aware context passing and bidirectional postMessage communication.
|
|
11
11
|
|
|
12
12
|
## Overview
|
|
13
13
|
|
|
14
|
-
The AI agent plugin embeds an external chatbot via an iframe panel that slides in from the right side of the application. It automatically sends the current blade context (user, active blade, selected items) to the chatbot and handles incoming commands (navigate,
|
|
14
|
+
The AI agent plugin embeds an external chatbot via an iframe panel that slides in from the right side of the application. It automatically sends the current blade context (user, active blade, selected items) to the chatbot and handles incoming commands (navigate, download files). The plugin is optional -- if no `APP_AI_AGENT_URL` environment variable or `config.url` is provided, it silently skips installation.
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
17
17
|
|
|
18
18
|
- Embed an AI assistant chatbot panel into your vc-shell application with automatic blade context passing
|
|
19
|
-
- Enable preview/apply workflows where AI suggests changes and the user confirms them
|
|
20
19
|
- When NOT to use: if you don't have an AI agent backend -- the plugin silently skips when no `APP_AI_AGENT_URL` is set
|
|
21
20
|
|
|
22
21
|
## Installation / Registration
|
|
@@ -88,10 +87,7 @@ Binds blade data to the AI agent context. Call this in each blade that should pa
|
|
|
88
87
|
| `dataRef` | `Ref<T> \| Ref<T[]>` | Data to send (single object for details, array for list) |
|
|
89
88
|
| `suggestions` | `ISuggestion[]` | Custom suggestion cards for the chatbot UI |
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
| ---------------------------- | ----------------------- | ------------------------------------------------ |
|
|
93
|
-
| `previewState.isActive` | `ComputedRef<boolean>` | Whether AI-suggested changes are being previewed |
|
|
94
|
-
| `previewState.changedFields` | `ComputedRef<string[]>` | List of field names with pending changes |
|
|
90
|
+
The composable returns `void`. It wires the watcher and the unmount cleanup; nothing is exposed to the caller.
|
|
95
91
|
|
|
96
92
|
### PostMessage Protocol
|
|
97
93
|
|
|
@@ -103,12 +99,9 @@ Binds blade data to the AI agent context. Call this in each blade that should pa
|
|
|
103
99
|
**Chatbot to Shell:**
|
|
104
100
|
|
|
105
101
|
- `CHAT_READY` -- Chatbot finished loading
|
|
106
|
-
- `NAVIGATE_TO_APP` -- Open a specific blade
|
|
107
|
-
- `
|
|
108
|
-
- `
|
|
109
|
-
- `RELOAD_BLADE` -- Reload the current blade
|
|
110
|
-
- `DOWNLOAD_FILE` -- Download a file (base64)
|
|
111
|
-
- `CHAT_ERROR` -- Error from chatbot
|
|
102
|
+
- `NAVIGATE_TO_APP` -- Open a specific blade (driven by markdown action links in assistant messages)
|
|
103
|
+
- `EXPAND_IN_CHAT` -- Expand an item inline in the chat (markdown action link)
|
|
104
|
+
- `SHOW_MORE` -- Request the next page of a result category (markdown action link)
|
|
112
105
|
|
|
113
106
|
## Usage
|
|
114
107
|
|
|
@@ -117,7 +110,7 @@ Binds blade data to the AI agent context. Call this in each blade that should pa
|
|
|
117
110
|
```typescript
|
|
118
111
|
// In a details blade
|
|
119
112
|
const product = ref<Product>({});
|
|
120
|
-
|
|
113
|
+
useAiAgentContext({
|
|
121
114
|
dataRef: product,
|
|
122
115
|
suggestions: [{ id: "translate", title: "Translate", icon: "translation", prompt: "Translate to English" }],
|
|
123
116
|
});
|
|
@@ -149,17 +142,6 @@ onMessage((message) => {
|
|
|
149
142
|
});
|
|
150
143
|
```
|
|
151
144
|
|
|
152
|
-
### Preview State Visual Feedback
|
|
153
|
-
|
|
154
|
-
```vue
|
|
155
|
-
<template>
|
|
156
|
-
<VcInput
|
|
157
|
-
v-model="product.name"
|
|
158
|
-
:class="{ 'ai-preview': previewState.changedFields.value.includes('name') }"
|
|
159
|
-
/>
|
|
160
|
-
</template>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
145
|
## Related
|
|
164
146
|
|
|
165
147
|
- `framework/core/plugins/ai-agent/services/ai-agent-service.ts` -- core service factory (`createAiAgentService`)
|
|
@@ -130,9 +130,7 @@ Plugins can register components **before** the host declares the extension point
|
|
|
130
130
|
2. Later, host calls `defineExtensionPoint("seller:commissions")` -- the store upgrades the entry to "declared" and preserves all previously registered components.
|
|
131
131
|
3. The host's `components` computed ref reactively picks up the registered components.
|
|
132
132
|
|
|
133
|
-
This means module load order does not matter. Remote modules loaded via Module Federation may install in any sequence, and extensions still work.
|
|
134
|
-
|
|
135
|
-
> **Dev warning:** In development mode, if a plugin registers into a point that is never declared, a console warning appears: `Extension point "xyz" is not declared.` This helps catch typos in extension point names.
|
|
133
|
+
This means module load order does not matter. Remote modules loaded via Module Federation may install in any sequence, and extensions still work. Plugins typically register in module `install()` at app startup, while hosts declare lazily when their page mounts -- an undeclared entry in between is a normal, expected state.
|
|
136
134
|
|
|
137
135
|
### Priority-Based Sorting
|
|
138
136
|
|
|
@@ -517,7 +515,7 @@ add({ id: "my-fields", component: MyFields });
|
|
|
517
515
|
// Component is registered but never rendered because the host declared "seller:commissions"
|
|
518
516
|
```
|
|
519
517
|
|
|
520
|
-
|
|
518
|
+
There is no console warning for this case -- registering before a host declares the point is a supported flow, so the framework cannot tell a typo apart from a host page that simply has not been opened yet. The most reliable protection is to avoid string literals altogether:
|
|
521
519
|
|
|
522
520
|
> **Tip:** Define constants for your extension point names in a shared file:
|
|
523
521
|
>
|
|
@@ -37,7 +37,7 @@ The composables follow a PrimeVue-inspired pattern: each returns reactive state
|
|
|
37
37
|
|
|
38
38
|
| Composable | Purpose |
|
|
39
39
|
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
-
| `useTableRowReorder` | Drag-and-drop row reordering
|
|
40
|
+
| `useTableRowReorder` | Drag-and-drop row reordering via SortableJS (touch + mouse). Dragging is restricted to a handle selector. Commits on SortableJS `onEnd` with `{ dragIndex, dropIndex, value }`. Keeps an optimistic `reorderedItems` buffer until the parent updates `items`. |
|
|
41
41
|
| `useTableColumnsReorder` | Drag-and-drop column reordering with 50% horizontal threshold. Returns `getReorderHeadProps()` for easy binding. |
|
|
42
42
|
| `useTableColumnsResize` | Weight-based resize: dragging adjusts the weights of the dragged column and its right neighbor without touching other columns. DOM-based px updates during drag for smooth 60fps; commits new weights to `columnState` on mouseup. No `ResizeObserver` scaling. |
|
|
43
43
|
| `useTableSelectionV2` | Row selection: single, multiple (checkbox), and row-click modes. Emits `RowSelectEvent` / `RowSelectAllEvent`. |
|
|
@@ -160,7 +160,7 @@ register({
|
|
|
160
160
|
### Contributor notes
|
|
161
161
|
|
|
162
162
|
- `useDataTableState`: Guard against save-during-restore loops with the `isRestoring` flag.
|
|
163
|
-
- `useTableRowReorder`:
|
|
163
|
+
- `useTableRowReorder`: powered by SortableJS with `forceFallback: true` so it works on touch. Dragging is limited to the `handle` selector. The optimistic `reorderedItems`/`pendingReorder` buffer makes Vue the source of DOM truth and hides SortableJS's raw DOM mutation until the parent updates `items`.
|
|
164
164
|
- `useTableColumnsResize` applies DOM-level px changes during drag for 60fps performance, then commits final weights to `columnState` on mouseup. No `ResizeObserver` scaling is involved.
|
|
165
165
|
|
|
166
166
|
<!-- internal:end -->
|
|
@@ -641,7 +641,7 @@ When `show-all-columns` is `false`, only `image` and `name` remain visible.
|
|
|
641
641
|
|
|
642
642
|
## Row Reorder
|
|
643
643
|
|
|
644
|
-
Enable drag-and-drop row reordering
|
|
644
|
+
Enable drag-and-drop row reordering. A grip handle appears on the left of each row (desktop) or card (mobile) whenever `reorderable-rows` is enabled, and dragging is initiated from that handle. Reorder works on both desktop and touch devices (powered by SortableJS):
|
|
645
645
|
|
|
646
646
|
```vue
|
|
647
647
|
<template>
|
|
@@ -678,7 +678,7 @@ function onReorder(event: { dragIndex: number; dropIndex: number; value: Product
|
|
|
678
678
|
</script>
|
|
679
679
|
```
|
|
680
680
|
|
|
681
|
-
> **Tip:**
|
|
681
|
+
> **Tip:** Setting `:reorderable-rows="true"` is enough — a grip handle is shown automatically and is the only drag affordance (so row clicks, mobile swipe actions, and long-press selection keep working). A dedicated `:row-reorder` VcColumn is optional and simply reserves an aligned column slot for the handle. On mobile, drag the handle to reorder cards.
|
|
682
682
|
|
|
683
683
|
---
|
|
684
684
|
|