create-loopengine 0.1.71 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -135,6 +135,7 @@ import {
|
|
|
135
135
|
type DecisionOutcome,
|
|
136
136
|
type MessagingDeps,
|
|
137
137
|
handleMessagingAction,
|
|
138
|
+
settleThreadChoice,
|
|
138
139
|
describeChange,
|
|
139
140
|
openSlackAnswerModal,
|
|
140
141
|
parseSlackInteraction,
|
|
@@ -2803,6 +2804,12 @@ async function handleSlackInteraction(req: IncomingMessage, res: ServerResponse,
|
|
|
2803
2804
|
if (interaction.type === 'decide') await resolvePendingApproval(capture.res, interaction.pendingId, { decision: interaction.decision })
|
|
2804
2805
|
else await answerPendingQuestion(capture.res, interaction.pendingId, { answer: interaction.answer })
|
|
2805
2806
|
const outcome = await capture.done
|
|
2807
|
+
// A proposed change or a Confirm still waiting in the thread no longer
|
|
2808
|
+
// applies: replace it so its buttons don't linger.
|
|
2809
|
+
if (botToken && outcome.status < 400 && !outcome.body.alreadyResolved) {
|
|
2810
|
+
const done = interaction.type === 'decide' ? (interaction.decision === 'approve' ? 'Approved' : 'Denied') : 'Answered'
|
|
2811
|
+
await settleThreadChoice(slackMessagingDeps(agentName, entry, botToken), interaction.pendingId, `${done}${interaction.user ? ` by <@${interaction.user}>` : ''} with the request's own buttons.`).catch((err) => console.error('[loopengine] Slack update failed:', err))
|
|
2812
|
+
}
|
|
2806
2813
|
if (interaction.responseUrl) {
|
|
2807
2814
|
let text = slackOutcomeText(interaction.type === 'decide' ? interaction.decision : 'answer', outcome.status, outcome.body, interaction.user)
|
|
2808
2815
|
if (ran && outcome.status < 400 && !outcome.body.alreadyResolved) text += ran
|