@khalilgharbaoui/opencode-claude-code-plugin 0.29.1 → 0.29.2

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/dist/index.js CHANGED
@@ -786,12 +786,13 @@ function unwrapToolOutput(part) {
786
786
  }
787
787
  }
788
788
  function unwrapOpencodeQuestionResult(value, question) {
789
- if (!value.startsWith(OPENCODE_QUESTION_RESULT_PREFIX) || !value.endsWith(OPENCODE_QUESTION_RESULT_SUFFIX)) {
789
+ const sentence = value.trim();
790
+ if (!sentence.startsWith(OPENCODE_QUESTION_RESULT_PREFIX) || !sentence.endsWith(OPENCODE_QUESTION_RESULT_SUFFIX)) {
790
791
  return value;
791
792
  }
792
- const body = value.slice(
793
+ const body = sentence.slice(
793
794
  OPENCODE_QUESTION_RESULT_PREFIX.length,
794
- value.length - OPENCODE_QUESTION_RESULT_SUFFIX.length
795
+ sentence.length - OPENCODE_QUESTION_RESULT_SUFFIX.length
795
796
  );
796
797
  if (!body.startsWith('"') || !body.endsWith('"')) return value;
797
798
  let answer;