-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Agent type strings ("claude", "codex", "opencode") are hardcoded as raw string arrays in three separate locations:
AgentCreationSheet.swift:17—["claude", "codex", "opencode"]PromptCreationSheet.swift:14—["", "claude", "codex", "opencode"]AgentsHubView.swift:163—["", "claude", "codex", "opencode"]
Adding a new agent type requires finding and updating all three. The two variants (with/without empty string for "Any") add confusion.
Additionally, other stringly-typed patterns exist:
- PR review decisions in
PRRowView.swift:72-85("APPROVED","CHANGES_REQUESTED","REVIEW_REQUIRED") - Diff status codes in
DiffCardView.swift:86-110("A","D","M","??") - Prompt scope wire values checked as
prompt.source == "global"in multiple places inAgentsHubView.swift
Suggested approach
- Create an
AgentTypeKindenum withallCasesfor pickers - Create a
ReviewDecisionenum for PR review decisions - Create a
DiffStatusCodeenum for diff statuses - Make
SavedPrompt.sourcea typed enum instead of raw string
Files
apps/purepoint-macos/purepoint-macos/Views/Agents/AgentCreationSheet.swiftapps/purepoint-macos/purepoint-macos/Views/Agents/PromptCreationSheet.swiftapps/purepoint-macos/purepoint-macos/Views/Agents/AgentsHubView.swiftapps/purepoint-macos/purepoint-macos/Views/Detail/PRRowView.swiftapps/purepoint-macos/purepoint-macos/Views/Detail/DiffCardView.swift
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request