Documentation
¶
Index ¶
- type Handler
- type Registry
- func (r *Registry) GetPrompt(_ context.Context, name string, arguments map[string]string) (*protocol.PromptMessage, error)
- func (r *Registry) ListPrompts(_ context.Context, cursor string) ([]protocol.Prompt, string, error)
- func (r *Registry) RegisterPrompt(prompt protocol.Prompt)
- func (r *Registry) RegisterPromptWithHandler(prompt protocol.Prompt, handler Handler)
- func (r *Registry) UnregisterPrompt(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler func(prompt protocol.Prompt, arguments map[string]string) (*protocol.PromptMessage, error)
Handler is a function that generates a prompt message based on arguments
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry provides a simple way to register individual prompts
func (*Registry) GetPrompt ¶
func (r *Registry) GetPrompt(_ context.Context, name string, arguments map[string]string) (*protocol.PromptMessage, error)
GetPrompt implements PromptProvider interface
func (*Registry) ListPrompts ¶
ListPrompts implements PromptProvider interface
func (*Registry) RegisterPrompt ¶
RegisterPrompt adds a prompt to the registry
func (*Registry) RegisterPromptWithHandler ¶
RegisterPromptWithHandler adds a prompt with a custom handler to the registry
func (*Registry) UnregisterPrompt ¶
UnregisterPrompt removes a prompt from the registry
Click to show internal directories.
Click to hide internal directories.