-
Notifications
You must be signed in to change notification settings - Fork 13
feat: add a chat group mode conversation #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -231,9 +231,11 @@ def display_new_block( | |||||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||||||
| absolute_length = self.GetLastPosition() | ||||||||||||||||||||||||||||||||||||
| new_block_ref = weakref.ref(new_block) | ||||||||||||||||||||||||||||||||||||
| is_group_followup = ( | ||||||||||||||||||||||||||||||||||||
| new_block.group_position is not None | ||||||||||||||||||||||||||||||||||||
| and new_block.group_position > 0 | ||||||||||||||||||||||||||||||||||||
| # Skip user request for group follow-up blocks: | ||||||||||||||||||||||||||||||||||||
| # - any block with group_position > 0 (not the chain opener), or | ||||||||||||||||||||||||||||||||||||
| # - position-0 blocks in subsequent rounds (empty sentinel request). | ||||||||||||||||||||||||||||||||||||
| is_group_followup = new_block.group_id is not None and ( | ||||||||||||||||||||||||||||||||||||
| new_block.group_position > 0 or not new_block.request.content | ||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+234
to
239
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
python - <<'PY'
group_position = None
try:
group_position > 0
except Exception as exc:
print(type(exc).__name__, str(exc))
PYRepository: SigmaNight/basiliskLLM Length of output: 135 🏁 Script executed: # Check the MessageBlock.group_position type definition
grep -n "group_position" basilisk/conversation/conversation_model.py | head -20Repository: SigmaNight/basiliskLLM Length of output: 119 🏁 Script executed: # Read the exact code at lines 234-239 in history_msg_text_ctrl.py
sed -n '234,239p' basilisk/views/history_msg_text_ctrl.pyRepository: SigmaNight/basiliskLLM Length of output: 381 🏁 Script executed: # Get broader context around lines 234-239 to understand the flow
sed -n '230,245p' basilisk/views/history_msg_text_ctrl.pyRepository: SigmaNight/basiliskLLM Length of output: 778 Guard Line 238 performs Proposed fix- is_group_followup = new_block.group_id is not None and (
- new_block.group_position > 0 or not new_block.request.content
- )
+ group_position = new_block.group_position
+ is_group_followup = new_block.group_id is not None and (
+ (
+ group_position is not None
+ and group_position > 0
+ )
+ or not new_block.request.content
+ )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| if not self.IsEmpty(): | ||||||||||||||||||||||||||||||||||||
| absolute_length = self.append_suffix(new_block_ref, absolute_length) | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replay the opener request when rebuilding group history.
Once participant 2+ is sent
request_content="", this method becomes theonly place they can still receive the original user turn. Right now non-own
group blocks contribute only
block.response, and theif ...contentguards also drop attachment-only requests. In normal mode that leaves later
participants without the user's prompt/files.
🛠️ Proposed fix
Also applies to: 188-191
🤖 Prompt for AI Agents