coding-agent-adapters 0.4.0 → 0.4.1
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/README.md +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -761,7 +761,8 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
761
761
|
detectTaskComplete(output) {
|
|
762
762
|
const stripped = this.stripAnsi(output);
|
|
763
763
|
const hasDuration = /[A-Z][A-Za-z' -]{2,40}\s+for\s+\d+(?:h\s+\d{1,2}m\s+\d{1,2}s|m\s+\d{1,2}s|s)/.test(stripped);
|
|
764
|
-
const
|
|
764
|
+
const tail = stripped.slice(-300);
|
|
765
|
+
const hasIdlePrompt = /❯/.test(tail);
|
|
765
766
|
if (hasDuration && hasIdlePrompt) {
|
|
766
767
|
return true;
|
|
767
768
|
}
|
|
@@ -775,10 +776,11 @@ var ClaudeAdapter = class extends BaseCodingAdapter {
|
|
|
775
776
|
if (/trust.*directory|do you want to|needs? your permission/i.test(stripped)) {
|
|
776
777
|
return false;
|
|
777
778
|
}
|
|
779
|
+
const tail = stripped.slice(-300);
|
|
778
780
|
return stripped.includes("How can I help") || stripped.includes("What would you like") || // v2.1+ shows "for shortcuts" hint when ready
|
|
779
781
|
stripped.includes("for shortcuts") || // Match "claude> " or similar specific prompts, not bare ">"
|
|
780
|
-
/claude
|
|
781
|
-
|
|
782
|
+
/claude>/i.test(tail) || // v2.1+ uses ❯ as the input prompt
|
|
783
|
+
/❯/.test(tail);
|
|
782
784
|
}
|
|
783
785
|
parseOutput(output) {
|
|
784
786
|
const stripped = this.stripAnsi(output);
|