mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 11:53:52 +08:00
feat: Enhance A2UI with RadioGroup and Markdown support
- Added support for RadioGroup component in A2UI, allowing single selection from multiple options. - Implemented Markdown parsing in A2UIPopupCard for better content rendering. - Updated A2UIPopupCard to handle different question types and improved layout for multi-select and single-select questions. - Introduced new utility functions for handling disabled items during installation. - Enhanced installation process to restore previously disabled skills and commands. - Updated notification store and related tests to accommodate new features. - Adjusted Vite configuration for better development experience.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { renderHook, act } from '@testing-library/react';
|
||||
import { useNotificationStore } from '../notificationStore';
|
||||
import type { SurfaceUpdate } from '../packages/a2ui-runtime/core/A2UITypes';
|
||||
import type { SurfaceUpdate } from '../../packages/a2ui-runtime/core/A2UITypes';
|
||||
|
||||
describe('NotificationStore A2UI Methods', () => {
|
||||
beforeEach(() => {
|
||||
@@ -128,7 +128,7 @@ describe('NotificationStore A2UI Methods', () => {
|
||||
|
||||
const { result } = renderHook(() => useNotificationStore());
|
||||
|
||||
let notificationId: string;
|
||||
let notificationId: string = '';
|
||||
act(() => {
|
||||
notificationId = result.current.addA2UINotification(surface);
|
||||
});
|
||||
@@ -312,7 +312,7 @@ describe('NotificationStore A2UI Methods', () => {
|
||||
surfaceId: 'question-1',
|
||||
title: 'Test Question',
|
||||
questions: [
|
||||
{ id: 'q1', question: 'What is your name?', type: 'text', required: true },
|
||||
{ id: 'q1', question: 'What is your name?', type: 'text' as const, required: true },
|
||||
],
|
||||
};
|
||||
|
||||
@@ -329,7 +329,7 @@ describe('NotificationStore A2UI Methods', () => {
|
||||
const mockQuestion = {
|
||||
surfaceId: 'question-1',
|
||||
title: 'Test',
|
||||
questions: [{ id: 'q1', question: 'Test?', type: 'text' }],
|
||||
questions: [{ id: 'q1', question: 'Test?', type: 'text' as const, required: true }],
|
||||
};
|
||||
|
||||
act(() => {
|
||||
@@ -353,7 +353,7 @@ describe('NotificationStore A2UI Methods', () => {
|
||||
|
||||
const { result } = renderHook(() => useNotificationStore());
|
||||
|
||||
let notificationId: string;
|
||||
let notificationId: string = '';
|
||||
act(() => {
|
||||
notificationId = result.current.addA2UINotification(surface);
|
||||
});
|
||||
|
||||
@@ -349,7 +349,7 @@ export const useNotificationStore = create<NotificationStore>()(
|
||||
}
|
||||
},
|
||||
|
||||
retryAction: async (actionKey: string, notificationId: string) => {
|
||||
retryAction: async (actionKey: string) => {
|
||||
const state = get();
|
||||
const actionState = state.actionStates.get(actionKey);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user