Skip to content

Commit 65d7f50

Browse files
authored
feat(tools): increase transcript length, record all user input (#984)
For `report_issue` tool: - Take last 10 chats instead of last 5 - Also accept any user input, like commands (/acceptall, /clear).
1 parent d705b33 commit 65d7f50

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

crates/q_cli/src/cli/chat/conversation_state.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ impl ConversationState {
157157
None
158158
};
159159

160-
// Record message before adding context.
161-
self.append_user_transcript(&input);
162-
163160
// Combine context files with user input if available
164161
let content = if let Some(context) = context_files {
165162
format!("{}\n{}", context, input)

crates/q_cli/src/cli/chat/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ where
576576
}
577577
};
578578

579+
self.conversation_state.append_user_transcript(&user_input);
579580
Ok(ChatState::HandleInput {
580581
input: user_input,
581582
tool_uses: Some(tool_uses),

crates/q_cli/src/cli/chat/tools/gh_issue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct GhIssueContext<'a> {
3030
}
3131

3232
/// Max amount of user chat + assistant recent chat messages to include in the issue.
33-
const MAX_TRANSCRIPT_LEN: usize = 5;
33+
const MAX_TRANSCRIPT_LEN: usize = 10;
3434

3535
impl GhIssue {
3636
pub async fn invoke(&self, _updates: impl Write, context: GhIssueContext<'_>) -> Result<InvokeOutput> {

0 commit comments

Comments
 (0)