Skip to content

Message history not passed to ACP adapters on chat restoration #63

@gsalbuquerque-orb

Description

@gsalbuquerque-orb

Hello, @ravitemer

Hope you're fine. I have to say I admire your work on this plugin and would like to open an issue regarding ACP adapter. This bug happens when retrieving the chat messages from a previous conversation, the chat doesn't 'remember' what have been discussed so far, since codecompanion.nvim filters messages marked as sent (_meta.sent == true). Thus the plugin isn't able to actually resume conversations.

The bug, however, doesn't seem to lie in codecompanion-history.nvim itself, which seems to handle correctly messages all the way to CodeCompanion.ACPAdapter.form_messages function. This function, by its turn, filters messages that the agent hasn't seen before.

I'd like to know if you're aware of this problem and if there's any work to prevent this or override default ACP Adapter behavior. I'd like to share some thoughts though, as this would either require changing codecompanion.nvim behavior (or API) or some workaround from our side (perhaps setting _meta.sent = false before sending it to form_messages?).

Thank you by the awesome work! Cheers and best regards =)

You may want to see this: https://github.com/olimorris/codecompanion.nvim/blob/3559fffb1410f86314fa1ed401c99e14b95482a7/lua/codecompanion/adapters/acp/helpers.lua#L17

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