feat: switch model or agent and start new sessions
- chat: a searchable sheet picks the model or agent for the session; the choice is applied through the server and mirrored in the session list - sessions: a new-session sheet with a title and a working directory (the server's default plus the directories already listed); creating one opens its chat - ocapi: list models with their display names and read the server's default location - bump version to 0.1.1 (build 2)
This commit is contained in:
1 parent
254d08b1bd
commit
23f72fc46d
9 files changed
+461
-42
No files matched your search
@@ -65,6 +65,7 @@ func (c *controller) connectScreen() ui.Node {
|
||||
|
||||
func (c *controller) sessionsScreen() ui.Node {
|
||||
nav := ui.UseNavigator()
|
||||
c.nav = nav
|
||||
return ui.Column(ui.Style{Grow: 1},
|
||||
ui.Row(ui.Style{Padding: ui.Symmetric(8, 16), Gap: 8, Align: ui.AlignCenter},
|
||||
ui.Text(c.server, ui.Style{Font: fonts.Footnote, Color: colors.SecondaryLabel, Lines: 1, Grow: 1}),
|
||||
@@ -97,11 +98,18 @@ func (c *controller) sessionsScreen() ui.Node {
|
||||
OnPress: func() {
|
||||
sess := s.Get()
|
||||
ch := c.openChat(&sess, nav)
|
||||
nav.Push(ch.screen, ui.ScreenOptions{Title: ch.title})
|
||||
nav.Push(ch.screen, ui.ScreenOptions{Title: ch.title, Actions: chatActions(ch)})
|
||||
},
|
||||
OnLongPress: func() { c.sessionMenu(s.Get()) },
|
||||
}, c.sessionRow(s, idx))
|
||||
}),
|
||||
ui.Sheet(ui.SheetProps{
|
||||
Open: c.newOpen,
|
||||
Detents: ui.DetentLarge,
|
||||
Grabber: true,
|
||||
Content: c.newSessionSheet,
|
||||
OnDismiss: func() { c.creating.Set(false) },
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user