fix(feedback): include session id in acknowledgement
This commit is contained in:
@@ -41,14 +41,18 @@ export function recordFeedback(session: Session, text: string): void {
|
||||
* Validate, record, and acknowledge one feedback entry. Returning an error
|
||||
* leaves no `feedback/record` event.
|
||||
* @param invocation - receiving agent, raw command input, and UI cancellation.
|
||||
* @returns an acknowledgement, or a usage error when no feedback text was supplied.
|
||||
* @returns an acknowledgement containing the receiving session id, or a usage error
|
||||
* when no feedback text was supplied.
|
||||
*/
|
||||
function executeFeedbackCommand(invocation: CommandInvocation): CommandResult {
|
||||
if (invocation.rawInput.trim().length === 0) {
|
||||
return { kind: 'error', text: `Feedback text is required. ${USAGE}` }
|
||||
}
|
||||
recordFeedback(invocation.agent.session, invocation.rawInput)
|
||||
return { kind: 'success', text: 'Feedback recorded.' }
|
||||
return {
|
||||
kind: 'success',
|
||||
text: `Feedback recorded for session ${invocation.agent.session.id}`,
|
||||
}
|
||||
}
|
||||
|
||||
/** Register the global `/feedback` command for every composed command adapter. */
|
||||
|
||||
Reference in New Issue
Block a user