Skip to content

Commit

Permalink
Give command context to prompts, not adaptor context.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnuxie committed Sep 10, 2024
1 parent df6061b commit 24cf85f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MatrixInterfaceAdaptor/MatrixInterfaceAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ export class StandardMatrixInterfaceAdaptor<AdaptorContext, MatrixEventContext>
`A PromptRequiredError was given for a parameter which doesn't support prompts, this shouldn't happen`
);
}
const commandContext =
this.adaptorToCommandContextTranslator.translateContext(
partialCommand.description,
adaptorContext
);
const promptOptionsResult = await parameter.prompt(
adaptorContext as never // weh, we know we have the right adaptorContext, it's just being annoying while we avoid controvariance.
commandContext as never // weh, we know we have the right adaptorContext, it's just being annoying while we avoid controvariance.
);
if (isError(promptOptionsResult)) {
return promptOptionsResult.elaborate(
Expand Down

0 comments on commit 24cf85f

Please sign in to comment.