Skip to content

assistant command crashes: missing field expires_at #35

@sha-w

Description

@sha-w

The kagi assistant command fails on every call with:

parse error: failed to parse assistant thread frame: missing field `expires_at` at line 1 column XXXX

Kagi stopped sending expires_at in the thread.json stream frame. The AssistantThreadPayload struct in src/api.rs has it as a required String, so serde blows up.

Fix is three lines:

src/api.rs — change expires_at: String to #[serde(default)] expires_at: Option<String> and update the From impl to use payload.expires_at.unwrap_or_default()

src/types.rs — add #[serde(default)] above pub expires_at: String

I have a working fork with the fix applied here: https://github.com/sha-w/kagi-cli-fix-asst

Happy to open a PR if that helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions