Remove public prompt version metadata
This commit is contained in:
15
listing.go
15
listing.go
@@ -50,14 +50,10 @@ type CollectionInfo struct {
|
||||
ReleaseVersion *string
|
||||
}
|
||||
|
||||
// PromptIdentity identifies one prompt ID and its optional descriptive version
|
||||
// label in the effective configuration captured when an Engine is constructed.
|
||||
// Version is metadata only and never participates in prompt selection. A nil
|
||||
// Version means no label was declared; a non-nil empty string is an explicit
|
||||
// label. It has no stable JSON representation.
|
||||
// PromptIdentity identifies one prompt in the effective configuration captured
|
||||
// when an Engine is constructed. It has no stable JSON representation.
|
||||
type PromptIdentity struct {
|
||||
ID string
|
||||
Version *string
|
||||
ID string
|
||||
}
|
||||
|
||||
// ListProfiles returns profile IDs in the effective configuration captured
|
||||
@@ -92,8 +88,7 @@ func (e *Engine) ListProfiles(ctx context.Context, filters ...NamespaceFilter) (
|
||||
}
|
||||
|
||||
// ListPrompts returns prompt IDs in the effective configuration captured when
|
||||
// the engine was constructed, sorted lexically by ID. Each identity may include
|
||||
// its descriptive version label. Its optional filter follows the same
|
||||
// the engine was constructed, sorted lexically by ID. Its optional filter follows the same
|
||||
// NamespaceDefault, NamespaceNamed, NamespaceUnqualified, and NamespaceAll
|
||||
// behavior as [Engine.ListProfiles], using the prompt namespace by default.
|
||||
// At most one filter is accepted.
|
||||
@@ -119,7 +114,7 @@ func (e *Engine) ListPrompts(ctx context.Context, filters ...NamespaceFilter) ([
|
||||
}
|
||||
public := make([]PromptIdentity, len(identities))
|
||||
for i, identity := range identities {
|
||||
public[i] = PromptIdentity{ID: identity.ID, Version: copyStringPtr(identity.Version)}
|
||||
public[i] = PromptIdentity{ID: identity.ID}
|
||||
}
|
||||
if err := ctx.Err(); err != nil {
|
||||
return nil, mapPublicError(err)
|
||||
|
||||
Reference in New Issue
Block a user