feat: expand magic prompts coverage and split generation prompts (#835)
- Add configurable visible/instructions prompt families for commit/PR generation, PR checks/comments flows, and git conflict resolution helpers. - Refactor prompt sending to explicit visible + synthetic parts instead of newline-based splitting, with legacy override migration for old keys. - Polish Magic Prompts settings UX with grouped sidebar entries, tooltip-based descriptions, AI icon, and validation that visible prompts cannot be empty across web and VS Code runtimes.
This commit is contained in:
committed by
GitHub
parent
2e5b02e753
commit
5f0d1623ae
@@ -0,0 +1,20 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
type MagicPromptsState = {
|
||||
selectedPromptId: string;
|
||||
setSelectedPromptId: (id: string) => void;
|
||||
};
|
||||
|
||||
const DEFAULT_PROMPT_ID = 'git.commit.generate';
|
||||
|
||||
export const useMagicPromptsStore = create<MagicPromptsState>((set) => ({
|
||||
selectedPromptId: DEFAULT_PROMPT_ID,
|
||||
setSelectedPromptId: (id) => {
|
||||
set((state) => {
|
||||
if (state.selectedPromptId === id) {
|
||||
return state;
|
||||
}
|
||||
return { selectedPromptId: id };
|
||||
});
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user