auto-claude: subtask-1-1 - Add taskId field to IdeaBase type and update store

- Add optional taskId field to IdeaBase interface to store the created
  task ID when an idea is converted to a task
- Add setIdeaTaskId action to ideation store that sets the taskId and
  updates the status to 'converted' in a single operation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
AndyMik90
2025-12-15 11:00:01 +01:00
co-authored by Claude Opus 4.5
parent ec48ef420e
commit b40f2de36b
2 changed files with 21 additions and 0 deletions
@@ -27,6 +27,7 @@ interface IdeationState {
setGenerationStatus: (status: IdeationGenerationStatus) => void;
setConfig: (config: Partial<IdeationConfig>) => void;
updateIdeaStatus: (ideaId: string, status: IdeationStatus) => void;
setIdeaTaskId: (ideaId: string, taskId: string) => void;
dismissIdea: (ideaId: string) => void;
dismissAllIdeas: () => void;
clearSession: () => void;
@@ -97,6 +98,25 @@ export const useIdeationStore = create<IdeationState>((set) => ({
};
}),
setIdeaTaskId: (ideaId, taskId) =>
set((state) => {
if (!state.session) return state;
const updatedIdeas = state.session.ideas.map((idea) =>
idea.id === ideaId
? { ...idea, taskId, status: 'converted' as IdeationStatus }
: idea
);
return {
session: {
...state.session,
ideas: updatedIdeas,
updatedAt: new Date()
}
};
}),
dismissIdea: (ideaId) =>
set((state) => {
if (!state.session) return state;
@@ -35,6 +35,7 @@ export interface IdeaBase {
rationale: string;
status: IdeationStatus;
createdAt: Date;
taskId?: string; // ID of the created task when status is 'converted'
}
export interface CodeImprovementIdea extends IdeaBase {