Capture profile and prompt listing identities

This commit is contained in:
2026-10-09 04:27:00 +00:00
parent d7fe70520a
commit 4d1895c223
5 changed files with 190 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
package configuration
import (
"context"
"gitea.maximumdirect.net/eric/promptkit/internal/domain"
)
func (state *loaded) ListProfiles(ctx context.Context) ([]string, error) {
if err := ctx.Err(); err != nil {
return nil, err
}
profiles := append([]string(nil), state.profileIDs...)
if err := ctx.Err(); err != nil {
return nil, err
}
return profiles, nil
}
func (state *loaded) ListPrompts(ctx context.Context) ([]domain.PromptIdentity, error) {
if err := ctx.Err(); err != nil {
return nil, err
}
prompts := append([]domain.PromptIdentity(nil), state.promptIDs...)
if err := ctx.Err(); err != nil {
return nil, err
}
return prompts, nil
}