R-7: mesh_first_views names the tool runner's own build, or says own build unknown
Builds: design 47 G §205, §424 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/process"
|
||||
"git.novox.be/novox/mesh-sdk/go/views"
|
||||
)
|
||||
|
||||
@@ -20,6 +21,10 @@ type FirstViewer interface {
|
||||
// state and since when.
|
||||
type entryLister interface{ Entries() any }
|
||||
|
||||
// ownBuilder is a FirstViewer that also says the build the tool runner itself was started with (design 47 G §205, §424):
|
||||
// mesh_first_views names it, or says `own build unknown` and why.
|
||||
type ownBuilder interface{ OwnBuild() process.Build }
|
||||
|
||||
// firstViewsAnswer is mesh_first_views and mesh_first_view_again.
|
||||
func (s *Surface) firstViewsAnswer(ctx context.Context, name string, args map[string]any) map[string]any {
|
||||
fv, ok := s.src.(FirstViewer)
|
||||
@@ -29,6 +34,9 @@ func (s *Surface) firstViewsAnswer(ctx context.Context, name string, args map[st
|
||||
}
|
||||
if name == verbFirstViews {
|
||||
out := map[string]any{"first views": fv.Status()}
|
||||
if ob, ok := fv.(ownBuilder); ok {
|
||||
out["own build"] = ob.OwnBuild().String()
|
||||
}
|
||||
if el, ok := fv.(entryLister); ok {
|
||||
out["entries"] = el.Entries()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user