Skip to content

Commit 616f2d5

Browse files
committed
fix: handle missing model providers in daily plan
1 parent 10512c0 commit 616f2d5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

frontend/src/lib/features/personal/PlanMyDay.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
2222
onMount(async () => {
2323
try {
24-
connections = await api.llmProviders.getEnabled();
24+
const enabledConnections = await api.llmProviders.getEnabled();
25+
connections = Array.isArray(enabledConnections) ? enabledConnections : [];
2526
const def = connections.find(c => c.is_default);
2627
if (def) selectedConnectionId = def.id;
2728
} catch (e) { /* silent — fallback still works */ }

internal/llm/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (m *ConnectionManager) ListEnabledPublic() ([]PublicConnectionInfo, error)
388388
}
389389
defer rows.Close()
390390

391-
var out []PublicConnectionInfo
391+
out := make([]PublicConnectionInfo, 0)
392392
for rows.Next() {
393393
var c PublicConnectionInfo
394394
var providerType string

0 commit comments

Comments
 (0)