Skip to content

Commit 0cbddc4

Browse files
committed
Add Smart Actions and AI Interface sections with contracts and required components
1 parent 4dd088a commit 0cbddc4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

content/prompts/development/component.prompt.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,30 @@ The fundamental building blocks used by all other widgets.
116116
* `atom.error` (Error Boundary/Message).
117117
* `atom.badge` (Status Indicators).
118118
119+
### G. Smart Actions (`action.*`)
120+
Executable elements bound to the Action Protocol. They handle permissions, loading states, and confirmation dialogs automatically.
121+
* **Contract:** Must implement `ActionComponentProps` (Ref: `src/ui/action.zod.ts`).
122+
```typescript
123+
type ActionComponentProps = {
124+
action: ActionSchema; // Metadata
125+
record?: any; // Context
126+
onExecute: () => Promise<void>;
127+
}
128+
```
129+
* **Required Components:**
130+
* `action.button`: Standalone smart button.
131+
* `action.group`: Toolbar or Button Group.
132+
* `action.menu`: Dropdown menu for overflow actions.
133+
* `action.icon`: Icon-only trigger (for dense lists).
134+
135+
### H. AI Interface (`ai.*`)
136+
Conversational and Generative UI components.
137+
* **Required Components:**
138+
* `ai.chat_window`: Standard conversational interface.
139+
* `ai.input`: Prompt input with auto-complete/context.
140+
* `ai.suggestion`: "Next Best Action" cards.
141+
* `ai.feedback`: Thumbs up/down + reasoning capture.
142+
119143
---
120144
121145
## 2. API Reference & Contracts

0 commit comments

Comments
 (0)