Documentation
¶
Index ¶
- func IsClaudeCodeClient(clientInfo *mcp.Implementation) bool
- func LoadProfilesForClient(ctx context.Context, clientInfo *mcp.Implementation, ...) error
- func SaveProfile(profile workingset.WorkingSet) error
- func SaveProfileForClient(clientInfo *mcp.Implementation, profile workingset.WorkingSet) error
- type ProfileActivator
- type ProfilesConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClaudeCodeClient ¶
func IsClaudeCodeClient(clientInfo *mcp.Implementation) bool
IsClaudeCodeClient checks if the client is Claude Code
func LoadProfilesForClient ¶
func LoadProfilesForClient(ctx context.Context, clientInfo *mcp.Implementation, activator ProfileActivator) error
LoadProfilesForClient loads profiles for the given client if it's Claude Code This encapsulates Claude Code-specific logic for profile loading
func SaveProfile ¶
func SaveProfile(profile workingset.WorkingSet) error
SaveProfile adds or updates a profile in profiles.json in the current working directory Uses atomic write pattern (write to temp file, then rename) to prevent data loss from concurrent writes
func SaveProfileForClient ¶
func SaveProfileForClient(clientInfo *mcp.Implementation, profile workingset.WorkingSet) error
SaveProfileForClient saves a profile for the given client if it's Claude Code This encapsulates Claude Code-specific logic for profile saving
Types ¶
type ProfileActivator ¶
type ProfileActivator interface {
ActivateProfile(ctx context.Context, ws workingset.WorkingSet) error
}
ProfileActivator is an interface for activating profiles
type ProfilesConfig ¶
type ProfilesConfig map[string]workingset.WorkingSet
ProfilesConfig represents the structure of profiles.json Maps profile names to their full WorkingSet data
func LoadProfiles ¶
func LoadProfiles(_ context.Context) (ProfilesConfig, error)
LoadProfiles loads and returns all profiles from profiles.json in the current working directory