mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
feat: enhance ideation routes with event handling and new suggestion feature
- Updated the ideation routes to include an EventEmitter for better event management. - Added a new endpoint to handle adding suggestions to the board, ensuring consistent category mapping. - Modified existing routes to emit events for idea creation, update, and deletion, improving frontend notifications. - Refactored the convert and create idea handlers to utilize the new event system. - Removed static guided prompts data in favor of dynamic fetching from the backend API.
This commit is contained in:
@@ -17,6 +17,8 @@ import type {
|
||||
IdeaCategory,
|
||||
IdeationSession,
|
||||
IdeationMessage,
|
||||
IdeationPrompt,
|
||||
PromptCategory,
|
||||
ProjectAnalysisResult,
|
||||
AnalysisSuggestion,
|
||||
StartSessionOptions,
|
||||
@@ -46,6 +48,8 @@ export type {
|
||||
IdeaCategory,
|
||||
IdeationSession,
|
||||
IdeationMessage,
|
||||
IdeationPrompt,
|
||||
PromptCategory,
|
||||
ProjectAnalysisResult,
|
||||
AnalysisSuggestion,
|
||||
StartSessionOptions,
|
||||
@@ -123,6 +127,14 @@ export interface IdeationAPI {
|
||||
suggestion: AnalysisSuggestion
|
||||
) => Promise<{ success: boolean; featureId?: string; error?: string }>;
|
||||
|
||||
// Get guided prompts (single source of truth from backend)
|
||||
getPrompts: () => Promise<{
|
||||
success: boolean;
|
||||
prompts?: IdeationPrompt[];
|
||||
categories?: PromptCategory[];
|
||||
error?: string;
|
||||
}>;
|
||||
|
||||
// Event subscriptions
|
||||
onStream: (callback: (event: any) => void) => () => void;
|
||||
onAnalysisEvent: (callback: (event: any) => void) => () => void;
|
||||
|
||||
Reference in New Issue
Block a user