Documentation
¶
Index ¶
- func LogLineFor(row bbapi.TimelineRow) (string, string, bool)
- type ComposerContext
- type DemoStore
- func (s *DemoStore) Activity(taskID int64) (bool, string)
- func (s *DemoStore) Context(taskID int64) ComposerContext
- func (s *DemoStore) CountTasksByProject(project string) (int, error)
- func (s *DemoStore) CountTasksByStatus(status string) (int, error)
- func (s *DemoStore) GetLatestLogPerTask(taskIDs []int64) (map[int64]*db.TaskLog, error)
- func (s *DemoStore) GetTask(id int64) (*db.Task, error)
- func (s *DemoStore) GetTaskLogCount(taskID int64) (int, error)
- func (s *DemoStore) GetTaskLogs(taskID int64, limit int) ([]*db.TaskLog, error)
- func (s *DemoStore) ListProjects() ([]*db.Project, error)
- func (s *DemoStore) ListTasks(opts db.ListTasksOptions) ([]*db.Task, error)
- func (s *DemoStore) MarkOpened(taskID int64) error
- func (s *DemoStore) SearchTasks(query string, limit int) ([]*db.Task, error)
- type Store
- func (s *Store) Activity(taskID int64) (bool, string)
- func (s *Store) Context(taskID int64) ComposerContext
- func (s *Store) CountTasksByProject(projectName string) (int, error)
- func (s *Store) CountTasksByStatus(status string) (int, error)
- func (s *Store) Err() error
- func (s *Store) GetLatestLogPerTask(taskIDs []int64) (map[int64]*db.TaskLog, error)
- func (s *Store) GetTask(id int64) (*db.Task, error)
- func (s *Store) GetTaskLogCount(taskID int64) (int, error)
- func (s *Store) GetTaskLogs(taskID int64, limit int) ([]*db.TaskLog, error)
- func (s *Store) ListProjects() ([]*db.Project, error)
- func (s *Store) ListTasks(opts db.ListTasksOptions) ([]*db.Task, error)
- func (s *Store) MarkOpened(taskID int64) error
- func (s *Store) OpenTask() int64
- func (s *Store) ProjectIDForName(name string) (string, error)
- func (s *Store) Refresh() error
- func (s *Store) RefreshOpenLogs()
- func (s *Store) SearchFiles(taskID int64, query string, limit int) []bbapi.ProjectFile
- func (s *Store) SearchTasks(query string, limit int) ([]*db.Task, error)
- func (s *Store) Skills(taskID int64) []bbapi.Skill
- func (s *Store) TaskID(threadID string) int64
- func (s *Store) ThreadID(taskID int64) (string, error)
- func (s *Store) Watch(stop <-chan struct{}, onChange func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogLineFor ¶
func LogLineFor(row bbapi.TimelineRow) (string, string, bool)
Types ¶
type ComposerContext ¶
type ComposerContext struct {
Project string
Environment string
Provider string
Model string
Reasoning string
Permission string
}
ComposerContext is what the app shows around its composer: where the thread runs, which model answers, and how much it is allowed to do.
type DemoStore ¶
type DemoStore struct {
// contains filtered or unexported fields
}
DemoStore serves an invented workspace. It exists so the screenshots in this repository can be regenerated by anyone, from data that belongs to nobody, without a bb server running.
func NewDemoStore ¶
func NewDemoStore() *DemoStore
NewDemoStore builds a workspace that looks like a working day: something running, a couple of things waiting on an answer, and a pile of finished work.
func (*DemoStore) Context ¶
func (s *DemoStore) Context(taskID int64) ComposerContext
Context is the execution the composer shows for a demo thread.
func (*DemoStore) CountTasksByProject ¶
func (*DemoStore) CountTasksByStatus ¶
func (*DemoStore) GetLatestLogPerTask ¶
func (*DemoStore) GetTaskLogs ¶
func (*DemoStore) MarkOpened ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store serves the board from bb. It holds threads in memory rather than in a local table so there is exactly one source of truth: nothing here is written back, and anything stale is replaced by the next refresh.
The cache exists because the UI asks for the task list on every tick, and a round trip per frame would be visible.
func (*Store) Activity ¶
Activity reports whether a thread is working and what it is doing, for the indicator the thread view shows while a turn is in flight.
func (*Store) Context ¶
func (s *Store) Context(taskID int64) ComposerContext
Context reads the execution options bb would apply to the next message.
func (*Store) CountTasksByProject ¶
func (*Store) Err ¶
Err reports the most recent refresh failure, if the board is showing stale data because bb went away.
func (*Store) GetLatestLogPerTask ¶
func (*Store) GetTaskLogs ¶
func (*Store) MarkOpened ¶
MarkOpened records which thread the user is reading. Only that thread's conversation is fetched, because a timeline per thread per tick would be a hundred requests a second for no one's benefit.
func (*Store) ProjectIDForName ¶
ProjectIDForName resolves the project name a board row carries back to bb's project id.
func (*Store) RefreshOpenLogs ¶
func (s *Store) RefreshOpenLogs()
RefreshOpenLogs re-reads the conversation of whichever thread is on screen.
func (*Store) SearchFiles ¶
SearchFiles asks bb to match paths, so a large repository costs one request rather than a full tree in memory.
func (*Store) SearchTasks ¶
func (*Store) Skills ¶
Skills lists the project's skills, cached because the catalogue is large and does not change while a message is being typed.
func (*Store) TaskID ¶
TaskID assigns a stable board number to a thread, so a row keeps its number for the life of the session.
func (*Store) Watch ¶
func (s *Store) Watch(stop <-chan struct{}, onChange func())
Watch keeps the cache current from bb's change feed, so the board reacts as the app does instead of waiting out a poll interval. It reconnects with backoff and refreshes on every reconnect, because changes that landed while the socket was down are not replayed.