()
| 717 | } |
| 718 | |
| 719 | const syncDraft = () => { |
| 720 | if (!area || area.isDestroyed) { |
| 721 | return |
| 722 | } |
| 723 | |
| 724 | syncParts() |
| 725 | const command = shell() ? undefined : selectedCommand(area.plainText, draft.command) |
| 726 | draft = shell() |
| 727 | ? { |
| 728 | text: area.plainText, |
| 729 | parts: structuredClone(parts), |
| 730 | mode: "shell", |
| 731 | } |
| 732 | : { |
| 733 | text: area.plainText, |
| 734 | parts: structuredClone(parts), |
| 735 | ...(command ? { command } : {}), |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | const push = (value: RunPrompt) => { |
| 740 | history = pushPromptHistory(history, value) |
no test coverage detected