on main help sign in
Merge branch 'main' into ui
71a89b3Ayman Bagabas
internal/db/sessions.sql.go+1−1
@@ -110,7 +110,7 @@ const listSessions = `-- name: ListSessions :many
110SELECT id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at, summary_message_id
110SELECT id, parent_session_id, title, message_count, prompt_tokens, completion_tokens, cost, updated_at, created_at, summary_message_id
111FROM sessions
111FROM sessions
112WHERE parent_session_id is NULL
112WHERE parent_session_id is NULL
113−ORDER BY created_at DESC
113+ORDER BY updated_at DESC
114`
114`
115
115
116func (q *Queries) ListSessions(ctx context.Context) ([]Session, error) {
116func (q *Queries) ListSessions(ctx context.Context) ([]Session, error) {
internal/db/sql/sessions.sql+1−1
@@ -32,7 +32,7 @@ WHERE id = ? LIMIT 1;
32SELECT *
32SELECT *
33FROM sessions
33FROM sessions
34WHERE parent_session_id is NULL
34WHERE parent_session_id is NULL
35−ORDER BY created_at DESC;
35+ORDER BY updated_at DESC;
36
36
37-- name: UpdateSession :one
37-- name: UpdateSession :one
38UPDATE sessions
38UPDATE sessions
internal/tui/components/dialogs/models/keys.go+2−2
@@ -15,7 +15,7 @@ type KeyMap struct {
15 isAPIKeyHelp bool
15 isAPIKeyHelp bool
16 isAPIKeyValid bool
16 isAPIKeyValid bool
17
17
18− isClaudeAuthChoiseHelp bool
18+ isClaudeAuthChoiceHelp bool
19 isClaudeOAuthHelp bool
19 isClaudeOAuthHelp bool
20 isClaudeOAuthURLState bool
20 isClaudeOAuthURLState bool
21 isClaudeOAuthHelpComplete bool
21 isClaudeOAuthHelpComplete bool
@@ -74,7 +74,7 @@ func (k KeyMap) FullHelp() [][]key.Binding {
74
74
75// ShortHelp implements help.KeyMap.
75// ShortHelp implements help.KeyMap.
76func (k KeyMap) ShortHelp() []key.Binding {
76func (k KeyMap) ShortHelp() []key.Binding {
77− if k.isClaudeAuthChoiseHelp {
77+ if k.isClaudeAuthChoiceHelp {
78 return []key.Binding{
78 return []key.Binding{
79 key.NewBinding(
79 key.NewBinding(
80 key.WithKeys("left", "right", "h", "l"),
80 key.WithKeys("left", "right", "h", "l"),
internal/tui/components/dialogs/models/models.go+4−4
@@ -164,7 +164,7 @@ func (m *modelDialogCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
164 }
164 }
165
165
166 askForApiKey := func() {
166 askForApiKey := func() {
167− m.keyMap.isClaudeAuthChoiseHelp = false
167+ m.keyMap.isClaudeAuthChoiceHelp = false
168 m.keyMap.isClaudeOAuthHelp = false
168 m.keyMap.isClaudeOAuthHelp = false
169 m.keyMap.isAPIKeyHelp = true
169 m.keyMap.isAPIKeyHelp = true
170 m.showClaudeAuthMethodChooser = false
170 m.showClaudeAuthMethodChooser = false
@@ -183,7 +183,7 @@ func (m *modelDialogCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
183 m.selectedModelType = modelType
183 m.selectedModelType = modelType
184 m.showClaudeAuthMethodChooser = false
184 m.showClaudeAuthMethodChooser = false
185 m.showClaudeOAuth2 = true
185 m.showClaudeOAuth2 = true
186− m.keyMap.isClaudeAuthChoiseHelp = false
186+ m.keyMap.isClaudeAuthChoiceHelp = false
187 m.keyMap.isClaudeOAuthHelp = true
187 m.keyMap.isClaudeOAuthHelp = true
188 }
188 }
189 return m, nil
189 return m, nil
@@ -252,7 +252,7 @@ func (m *modelDialogCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
252 } else {
252 } else {
253 if selectedItem.Provider.ID == catwalk.InferenceProviderAnthropic {
253 if selectedItem.Provider.ID == catwalk.InferenceProviderAnthropic {
254 m.showClaudeAuthMethodChooser = true
254 m.showClaudeAuthMethodChooser = true
255− m.keyMap.isClaudeAuthChoiseHelp = true
255+ m.keyMap.isClaudeAuthChoiceHelp = true
256 return m, nil
256 return m, nil
257 }
257 }
258 askForApiKey()
258 askForApiKey()
@@ -278,7 +278,7 @@ func (m *modelDialogCmp) Update(msg tea.Msg) (util.Model, tea.Cmd) {
278 if m.showClaudeAuthMethodChooser {
278 if m.showClaudeAuthMethodChooser {
279 m.claudeAuthMethodChooser.SetDefaults()
279 m.claudeAuthMethodChooser.SetDefaults()
280 m.showClaudeAuthMethodChooser = false
280 m.showClaudeAuthMethodChooser = false
281− m.keyMap.isClaudeAuthChoiseHelp = false
281+ m.keyMap.isClaudeAuthChoiceHelp = false
282 m.keyMap.isClaudeOAuthHelp = false
282 m.keyMap.isClaudeOAuthHelp = false
283 return m, nil
283 return m, nil
284 }
284 }