summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/app/interfaces.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-29 15:37:06 -0500
committeradamdottv <[email protected]>2025-05-29 15:37:06 -0500
commit0e31bbcd9322e1f667b87c88445a4f6effa1d934 (patch)
tree428bbd368a197cb3e80523c629437d8cde86b092 /internal/tui/app/interfaces.go
parent913b3434d8243cc9681a3bf7520e7b027ec3853b (diff)
downloadopencode-0e31bbcd9322e1f667b87c88445a4f6effa1d934.tar.gz
opencode-0e31bbcd9322e1f667b87c88445a4f6effa1d934.zip
wip: refactoring tui
Diffstat (limited to 'internal/tui/app/interfaces.go')
-rw-r--r--internal/tui/app/interfaces.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/internal/tui/app/interfaces.go b/internal/tui/app/interfaces.go
index 01271156e..4cc9b8022 100644
--- a/internal/tui/app/interfaces.go
+++ b/internal/tui/app/interfaces.go
@@ -2,29 +2,11 @@ package app
import (
"context"
- "time"
-
- "github.com/sst/opencode/internal/message"
- "github.com/sst/opencode/internal/pubsub"
)
-// MessageService defines the interface for message operations
-type MessageService interface {
- pubsub.Subscriber[message.Message]
-
- GetBySession(ctx context.Context, sessionID string) ([]message.Message, error)
- List(ctx context.Context, sessionID string) ([]message.Message, error)
- Create(ctx context.Context, sessionID string, params message.CreateMessageParams) (message.Message, error)
- Update(ctx context.Context, msg message.Message) (message.Message, error)
- Delete(ctx context.Context, id string) error
- DeleteSessionMessages(ctx context.Context, sessionID string) error
- Get(ctx context.Context, id string) (message.Message, error)
- ListAfter(ctx context.Context, sessionID string, timestamp time.Time) ([]message.Message, error)
-}
-
// AgentService defines the interface for agent operations
type AgentService interface {
- Run(ctx context.Context, sessionID string, text string, attachments ...message.Attachment) (string, error)
+ Run(ctx context.Context, sessionID string, text string, attachments ...Attachment) (string, error)
Cancel(sessionID string) error
IsBusy() bool
IsSessionBusy(sessionID string) bool