mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-01 14:00:30 +00:00
reimplement agent,provider and add file history
This commit is contained in:
parent
76b4065f17
commit
bbfa60c787
73 changed files with 3742 additions and 4026 deletions
|
|
@ -16,10 +16,8 @@ import (
|
|||
|
||||
type DetailComponent interface {
|
||||
tea.Model
|
||||
layout.Focusable
|
||||
layout.Sizeable
|
||||
layout.Bindings
|
||||
layout.Bordered
|
||||
}
|
||||
|
||||
type detailCmp struct {
|
||||
|
|
|
|||
|
|
@ -16,22 +16,14 @@ import (
|
|||
|
||||
type TableComponent interface {
|
||||
tea.Model
|
||||
layout.Focusable
|
||||
layout.Sizeable
|
||||
layout.Bindings
|
||||
layout.Bordered
|
||||
}
|
||||
|
||||
type tableCmp struct {
|
||||
table table.Model
|
||||
}
|
||||
|
||||
func (i *tableCmp) BorderText() map[layout.BorderPosition]string {
|
||||
return map[layout.BorderPosition]string{
|
||||
layout.TopLeftBorder: "Logs",
|
||||
}
|
||||
}
|
||||
|
||||
type selectedLogMsg logging.LogMessage
|
||||
|
||||
func (i *tableCmp) Init() tea.Cmd {
|
||||
|
|
@ -74,20 +66,6 @@ func (i *tableCmp) View() string {
|
|||
return i.table.View()
|
||||
}
|
||||
|
||||
func (i *tableCmp) Blur() tea.Cmd {
|
||||
i.table.Blur()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *tableCmp) Focus() tea.Cmd {
|
||||
i.table.Focus()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (i *tableCmp) IsFocused() bool {
|
||||
return i.table.Focused()
|
||||
}
|
||||
|
||||
func (i *tableCmp) GetSize() (int, int) {
|
||||
return i.table.Width(), i.table.Height()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue