@autohq/cli 0.1.197 → 0.1.198

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.
@@ -26640,7 +26640,7 @@ Object.assign(lookup, {
26640
26640
  // package.json
26641
26641
  var package_default = {
26642
26642
  name: "@autohq/cli",
26643
- version: "0.1.197",
26643
+ version: "0.1.198",
26644
26644
  license: "SEE LICENSE IN README.md",
26645
26645
  publishConfig: {
26646
26646
  access: "public"
package/dist/index.js CHANGED
@@ -21623,7 +21623,7 @@ var init_package = __esm({
21623
21623
  "package.json"() {
21624
21624
  package_default = {
21625
21625
  name: "@autohq/cli",
21626
- version: "0.1.197",
21626
+ version: "0.1.198",
21627
21627
  license: "SEE LICENSE IN README.md",
21628
21628
  publishConfig: {
21629
21629
  access: "public"
@@ -25935,14 +25935,6 @@ function ConversationView({
25935
25935
  const isFailed = status === "failed";
25936
25936
  const showPalette = input.startsWith("/") && !isFailed;
25937
25937
  const paletteQuery = showPalette ? input.slice(1) : "";
25938
- useInput3((_input, key) => {
25939
- if (key.escape) {
25940
- if (showPalette) {
25941
- setInput("");
25942
- return;
25943
- }
25944
- }
25945
- });
25946
25938
  const { finalized, pending } = useMemo2(
25947
25939
  () => partitionTranscriptRows(entries),
25948
25940
  [entries]
@@ -25950,6 +25942,21 @@ function ConversationView({
25950
25942
  const pendingQuestion = isFailed ? null : pendingQuestionRow([...finalized, ...pending], answeredQuestionIds);
25951
25943
  const showQuestionPrompt = pendingQuestion !== null && pendingQuestion.toolCallId !== null && !dismissedQuestionIds.has(pendingQuestion.toolCallId);
25952
25944
  const pendingQuestionToolCallId = pendingQuestion?.toolCallId ?? null;
25945
+ useInput3((_input, key) => {
25946
+ if (!key.escape) {
25947
+ return;
25948
+ }
25949
+ switch (conversationEscapeAction({ showPalette, showQuestionPrompt })) {
25950
+ case "clear-command-palette":
25951
+ setInput("");
25952
+ return;
25953
+ case "defer-to-question-prompt":
25954
+ return;
25955
+ case "go-back":
25956
+ exit();
25957
+ return;
25958
+ }
25959
+ });
25953
25960
  const handleSubmit = useCallback(
25954
25961
  async (value) => {
25955
25962
  if (!value.trim()) return;
@@ -26126,7 +26133,7 @@ function ConversationView({
26126
26133
  /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: workingDirectory })
26127
26134
  ] }),
26128
26135
  /* @__PURE__ */ jsx4(Text4, { children: " " }),
26129
- /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "/back to exit \xB7 scroll for history" })
26136
+ /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "esc or /back to exit \xB7 scroll for history" })
26130
26137
  ] })
26131
26138
  }
26132
26139
  ) }, item.id) : /* @__PURE__ */ jsx4(Box4, { paddingX: 2, children: /* @__PURE__ */ jsx4(TranscriptRowView, { row: item }) }, item.id) }),
@@ -26210,9 +26217,13 @@ function ConversationView({
26210
26217
  /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "\xB7" }),
26211
26218
  /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: sessionId })
26212
26219
  ] }),
26213
- /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
26214
- awaitingReply && !isFailed ? "working" : status,
26215
- debugActive ? " \xB7 debug" : ""
26220
+ /* @__PURE__ */ jsxs4(Box4, { gap: 2, children: [
26221
+ /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "esc to go back" }),
26222
+ /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "\xB7" }),
26223
+ /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
26224
+ awaitingReply && !isFailed ? "working" : status,
26225
+ debugActive ? " \xB7 debug" : ""
26226
+ ] })
26216
26227
  ] })
26217
26228
  ] })
26218
26229
  ] }),
@@ -26233,6 +26244,15 @@ function ConversationView({
26233
26244
  ] })
26234
26245
  ] });
26235
26246
  }
26247
+ function conversationEscapeAction(input) {
26248
+ if (input.showPalette) {
26249
+ return "clear-command-palette";
26250
+ }
26251
+ if (input.showQuestionPrompt) {
26252
+ return "defer-to-question-prompt";
26253
+ }
26254
+ return "go-back";
26255
+ }
26236
26256
  function WorkingIndicator({
26237
26257
  word,
26238
26258
  startedAt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.197",
3
+ "version": "0.1.198",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"