This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Fix Cline dict handling #1162
Description
Describe the issue
I think #1147 may have unknowingly broken Cline messages when retrieved by the dashboard APIs.
Cline often will use dicts within its messages and so the following bug now occurs:
AttributeError: 'dict' object has no attribute 'split'
2025-02-26T13:59:06.789419Z [error ] Error while getting messages lineno=426 module=v1 pathname=/app/src/codegate/api/v1.py
Traceback (most recent call last):
File "/app/src/codegate/api/v1.py", line 421, in get_workspace_messages
conversations, _ = await v1_processing.parse_messages_in_conversations(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/codegate/api/v1_processing.py", line 444, in parse_messages_in_conversations
conversations, map_q_id_to_conversation = await match_conversations(partial_question_answers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/codegate/api/v1_processing.py", line 401, in match_conversations
deduped_alerts = await remove_duplicate_alerts(selected_partial_qa.alerts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/codegate/api/v1_processing.py", line 520, in remove_duplicate_alerts
trigger_string_content = alert.trigger_string.split("Context")[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'split'
Steps to Reproduce
Install v0.1.25 and run a Cline prompt session and then attempt to view the message history.
Operating System
MacOS (Arm)
IDE and Version
N/A
Extension and Version
[3.4.9]
Provider
Other
Model
claude-sonnet.3.5
Codegate version
v0.1.25
Logs
No response
Additional Context
No response