mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
feat: suppress full prompt echo in Slack responses (#226)
Co-authored-by: Chris Estreich <cestreich@gmail.com>
This commit is contained in:
parent
96a8315748
commit
de381f909c
1 changed files with 10 additions and 0 deletions
|
|
@ -71,12 +71,22 @@ export async function processJob<T extends JobType>({
|
|||
case 'slack.app.mention': {
|
||||
const jobPayload = payload as JobPayload<'slack.app.mention'>;
|
||||
const { channel, thread_ts } = jobPayload;
|
||||
let isFirstMessage = true;
|
||||
|
||||
result = await processSlackMention(jobPayload, jobId, {
|
||||
onTaskStarted,
|
||||
onTaskMessage: async (message: ClineMessage) => {
|
||||
console.log(`onTaskMessage (${channel}, ${thread_ts}) ->`, message);
|
||||
|
||||
// Skip the first message to avoid echoing the prompt
|
||||
if (isFirstMessage) {
|
||||
isFirstMessage = false;
|
||||
console.log(
|
||||
`Skipping first message (prompt echo) for ${channel}, ${thread_ts}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
(message.say === 'text' || message.say === 'completion_result') &&
|
||||
message.text &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue