@dexto/tui 1.8.11 → 1.9.0

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.
@@ -33,12 +33,10 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
33
33
  ({ approval, onApprove, onDeny, onCancel }, ref) => {
34
34
  const isCommandApproval = approval.type === import_core.ApprovalType.COMMAND_APPROVAL;
35
35
  const isElicitation = approval.type === "elicitation";
36
- const isDirectoryAccess = approval.type === "directory_access";
37
- const directoryAccess = approval.metadata.directoryAccess;
38
- const hasToolDirectoryAccess = approval.type === import_core.ApprovalType.TOOL_APPROVAL && directoryAccess !== void 0 && typeof directoryAccess === "object" && directoryAccess !== null;
39
- const directoryAccessParentDir = hasToolDirectoryAccess && typeof directoryAccess.parentDir === "string" ? directoryAccess.parentDir : null;
40
36
  const toolName = approval.metadata.toolName;
41
37
  const toolArgs = approval.metadata.args || {};
38
+ const approvalKey = typeof approval.metadata.approvalKey === "string" ? approval.metadata.approvalKey : void 0;
39
+ const hasApprovalKey = approvalKey !== void 0;
42
40
  const callDescriptionRaw = typeof approval.metadata.description === "string" ? approval.metadata.description : void 0;
43
41
  const callDescription = (0, import_react.useMemo)(() => {
44
42
  if (!callDescriptionRaw) return null;
@@ -49,8 +47,6 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
49
47
  return `${singleLine.slice(0, Math.max(0, maxLength - 1))}\u2026`;
50
48
  }, [callDescriptionRaw]);
51
49
  const isPlanReview = toolName === "plan_review";
52
- const suggestedPatterns = approval.metadata.suggestedPatterns ?? [];
53
- const hasSuggestedPatterns = suggestedPatterns.length > 0;
54
50
  const isEditOrWriteTool = (0, import_toolUtils.isEditWriteTool)(toolName);
55
51
  const presentationSnapshot = (0, import_react.useMemo)(() => {
56
52
  const raw = approval.metadata.presentationSnapshot;
@@ -79,29 +75,12 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
79
75
  if (isPlanReview) {
80
76
  options.push({ id: "plan-approve", label: "Approve" });
81
77
  options.push({ id: "plan-approve-accept-edits", label: "Approve + Accept All Edits" });
82
- } else if (hasToolDirectoryAccess) {
83
- const dirLabel = directoryAccessParentDir ? ` ${(0, import_messageFormatting.formatPathForDisplay)(directoryAccessParentDir)}` : "";
84
- options.push({ id: "yes", label: "Yes (once)" });
85
- options.push({ id: "yes-directory-session", label: `Yes, allow${dirLabel} (session)` });
86
- options.push({ id: "no", label: "No" });
87
- } else if (hasSuggestedPatterns) {
88
- options.push({ id: "yes", label: "Yes (once)" });
89
- suggestedPatterns.forEach((pattern, i) => {
90
- options.push({
91
- id: `pattern-${i}`,
92
- label: `Yes, allow "${pattern}"`
93
- });
94
- });
95
- options.push({ id: "yes-session", label: "Yes, allow this tool (session)" });
96
- options.push({ id: "no", label: "No" });
97
78
  } else if (isCommandApproval) {
98
79
  options.push({ id: "yes", label: "Yes" });
99
80
  options.push({ id: "no", label: "No" });
100
- } else if (isDirectoryAccess) {
101
- const parentDir2 = approval.metadata.parentDir;
102
- const dirLabel = parentDir2 ? ` ${(0, import_messageFormatting.formatPathForDisplay)(parentDir2)}` : "";
81
+ } else if (hasApprovalKey) {
103
82
  options.push({ id: "yes", label: "Yes (once)" });
104
- options.push({ id: "yes-session", label: `Yes, allow${dirLabel} (session)` });
83
+ options.push({ id: "yes-session", label: "Yes, remember this approval" });
105
84
  options.push({ id: "no", label: "No" });
106
85
  } else if (isEditOrWriteTool) {
107
86
  options.push({ id: "yes", label: "Yes" });
@@ -167,25 +146,11 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
167
146
  } else if (option.id === "yes") {
168
147
  onApprove({});
169
148
  } else if (option.id === "yes-session") {
170
- if (isDirectoryAccess) {
171
- onApprove({ rememberDirectory: true });
172
- } else {
173
- onApprove({ rememberChoice: true });
174
- }
175
- } else if (option.id === "yes-directory-session") {
176
- onApprove({ rememberDirectory: true });
149
+ onApprove({ rememberChoice: true });
177
150
  } else if (option.id === "yes-accept-edits") {
178
151
  onApprove({ enableAcceptEditsMode: true });
179
152
  } else if (option.id === "no") {
180
153
  onDeny();
181
- } else if (option.id.startsWith("pattern-")) {
182
- const patternIndex = parseInt(option.id.replace("pattern-", ""), 10);
183
- const pattern = suggestedPatterns[patternIndex];
184
- if (pattern) {
185
- onApprove({ rememberPattern: pattern });
186
- } else {
187
- onApprove({});
188
- }
189
154
  }
190
155
  return true;
191
156
  } else if (key.shift && key.tab && isEditOrWriteTool) {
@@ -201,11 +166,8 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
201
166
  [
202
167
  isElicitation,
203
168
  isEditOrWriteTool,
204
- isDirectoryAccess,
205
- hasToolDirectoryAccess,
206
169
  isPlanReview,
207
170
  options,
208
- suggestedPatterns,
209
171
  onApprove,
210
172
  onDeny,
211
173
  onCancel,
@@ -265,21 +227,9 @@ const ApprovalPrompt = (0, import_react.forwardRef)(
265
227
  return null;
266
228
  }
267
229
  };
268
- const directoryPath = approval.metadata.path;
269
- const parentDir = approval.metadata.parentDir;
270
- const operation = approval.metadata.operation;
271
- const directoryAccessTitle = !isDirectoryAccess ? null : operation === "read" ? "Read file" : operation === "write" ? "Write file" : operation === "edit" ? "Edit file" : "Directory access";
272
- const directoryAccessToolHeader = !isDirectoryAccess || !toolName ? null : (0, import_messageFormatting.formatToolHeader)({
273
- toolName,
274
- args: directoryPath ?? parentDir ? { path: directoryPath ?? parentDir } : {},
275
- ...presentationSnapshot !== void 0 && { presentationSnapshot }
276
- }).header;
277
- const showHeaderBlock = isDirectoryAccess || isCommandApproval || !displayPreview;
230
+ const showHeaderBlock = isCommandApproval || !displayPreview;
278
231
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { paddingX: 0, paddingY: 0, flexDirection: "column", children: [
279
- showHeaderBlock && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", marginBottom: 0, children: isDirectoryAccess ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
280
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", bold: true, children: directoryAccessTitle ?? "Directory access" }) }),
281
- directoryAccessToolHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginBottom: 0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { wrap: "wrap", children: directoryAccessToolHeader }) })
282
- ] }) : isCommandApproval ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
232
+ showHeaderBlock && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", marginBottom: 0, children: isCommandApproval ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
283
233
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "row", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "yellowBright", bold: true, children: [
284
234
  "Confirm command:",
285
235
  " "
@@ -17,16 +17,12 @@ export interface ApprovalPromptHandle {
17
17
  * Options passed when approving a request
18
18
  */
19
19
  export interface ApprovalOptions {
20
- /** Remember this tool for the entire session (approves ALL uses) */
20
+ /** Remember this approval scope for the session */
21
21
  rememberChoice?: boolean;
22
- /** Remember an approval pattern (e.g., "git *") */
23
- rememberPattern?: string;
24
22
  /** Form data for elicitation requests */
25
23
  formData?: Record<string, unknown>;
26
24
  /** Enable "accept all edits" mode (auto-approve future edit_file/write_file) */
27
25
  enableAcceptEditsMode?: boolean;
28
- /** Remember directory access for the session */
29
- rememberDirectory?: boolean;
30
26
  }
31
27
  interface ApprovalPromptProps {
32
28
  approval: ApprovalRequest;
@@ -1 +1 @@
1
- {"version":3,"file":"ApprovalPrompt.d.ts","sourceRoot":"","sources":["../../src/components/ApprovalPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO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tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACR,kBAAkB,EAIrB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAM5D,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,mDAAmD;IACnD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,UAAU,mBAAmB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAYD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,kGA0Y1B,CAAC"}
@@ -12,17 +12,15 @@ import { ApprovalType } from "@dexto/core";
12
12
  import { ElicitationForm } from "./ElicitationForm.js";
13
13
  import { DiffPreview, CreateFilePreview } from "./renderers/index.js";
14
14
  import { isEditWriteTool } from "../utils/toolUtils.js";
15
- import { formatPathForDisplay, formatToolHeader } from "../utils/messageFormatting.js";
15
+ import { formatToolHeader } from "../utils/messageFormatting.js";
16
16
  const ApprovalPrompt = forwardRef(
17
17
  ({ approval, onApprove, onDeny, onCancel }, ref) => {
18
18
  const isCommandApproval = approval.type === ApprovalType.COMMAND_APPROVAL;
19
19
  const isElicitation = approval.type === "elicitation";
20
- const isDirectoryAccess = approval.type === "directory_access";
21
- const directoryAccess = approval.metadata.directoryAccess;
22
- const hasToolDirectoryAccess = approval.type === ApprovalType.TOOL_APPROVAL && directoryAccess !== void 0 && typeof directoryAccess === "object" && directoryAccess !== null;
23
- const directoryAccessParentDir = hasToolDirectoryAccess && typeof directoryAccess.parentDir === "string" ? directoryAccess.parentDir : null;
24
20
  const toolName = approval.metadata.toolName;
25
21
  const toolArgs = approval.metadata.args || {};
22
+ const approvalKey = typeof approval.metadata.approvalKey === "string" ? approval.metadata.approvalKey : void 0;
23
+ const hasApprovalKey = approvalKey !== void 0;
26
24
  const callDescriptionRaw = typeof approval.metadata.description === "string" ? approval.metadata.description : void 0;
27
25
  const callDescription = useMemo(() => {
28
26
  if (!callDescriptionRaw) return null;
@@ -33,8 +31,6 @@ const ApprovalPrompt = forwardRef(
33
31
  return `${singleLine.slice(0, Math.max(0, maxLength - 1))}\u2026`;
34
32
  }, [callDescriptionRaw]);
35
33
  const isPlanReview = toolName === "plan_review";
36
- const suggestedPatterns = approval.metadata.suggestedPatterns ?? [];
37
- const hasSuggestedPatterns = suggestedPatterns.length > 0;
38
34
  const isEditOrWriteTool = isEditWriteTool(toolName);
39
35
  const presentationSnapshot = useMemo(() => {
40
36
  const raw = approval.metadata.presentationSnapshot;
@@ -63,29 +59,12 @@ const ApprovalPrompt = forwardRef(
63
59
  if (isPlanReview) {
64
60
  options.push({ id: "plan-approve", label: "Approve" });
65
61
  options.push({ id: "plan-approve-accept-edits", label: "Approve + Accept All Edits" });
66
- } else if (hasToolDirectoryAccess) {
67
- const dirLabel = directoryAccessParentDir ? ` ${formatPathForDisplay(directoryAccessParentDir)}` : "";
68
- options.push({ id: "yes", label: "Yes (once)" });
69
- options.push({ id: "yes-directory-session", label: `Yes, allow${dirLabel} (session)` });
70
- options.push({ id: "no", label: "No" });
71
- } else if (hasSuggestedPatterns) {
72
- options.push({ id: "yes", label: "Yes (once)" });
73
- suggestedPatterns.forEach((pattern, i) => {
74
- options.push({
75
- id: `pattern-${i}`,
76
- label: `Yes, allow "${pattern}"`
77
- });
78
- });
79
- options.push({ id: "yes-session", label: "Yes, allow this tool (session)" });
80
- options.push({ id: "no", label: "No" });
81
62
  } else if (isCommandApproval) {
82
63
  options.push({ id: "yes", label: "Yes" });
83
64
  options.push({ id: "no", label: "No" });
84
- } else if (isDirectoryAccess) {
85
- const parentDir2 = approval.metadata.parentDir;
86
- const dirLabel = parentDir2 ? ` ${formatPathForDisplay(parentDir2)}` : "";
65
+ } else if (hasApprovalKey) {
87
66
  options.push({ id: "yes", label: "Yes (once)" });
88
- options.push({ id: "yes-session", label: `Yes, allow${dirLabel} (session)` });
67
+ options.push({ id: "yes-session", label: "Yes, remember this approval" });
89
68
  options.push({ id: "no", label: "No" });
90
69
  } else if (isEditOrWriteTool) {
91
70
  options.push({ id: "yes", label: "Yes" });
@@ -151,25 +130,11 @@ const ApprovalPrompt = forwardRef(
151
130
  } else if (option.id === "yes") {
152
131
  onApprove({});
153
132
  } else if (option.id === "yes-session") {
154
- if (isDirectoryAccess) {
155
- onApprove({ rememberDirectory: true });
156
- } else {
157
- onApprove({ rememberChoice: true });
158
- }
159
- } else if (option.id === "yes-directory-session") {
160
- onApprove({ rememberDirectory: true });
133
+ onApprove({ rememberChoice: true });
161
134
  } else if (option.id === "yes-accept-edits") {
162
135
  onApprove({ enableAcceptEditsMode: true });
163
136
  } else if (option.id === "no") {
164
137
  onDeny();
165
- } else if (option.id.startsWith("pattern-")) {
166
- const patternIndex = parseInt(option.id.replace("pattern-", ""), 10);
167
- const pattern = suggestedPatterns[patternIndex];
168
- if (pattern) {
169
- onApprove({ rememberPattern: pattern });
170
- } else {
171
- onApprove({});
172
- }
173
138
  }
174
139
  return true;
175
140
  } else if (key.shift && key.tab && isEditOrWriteTool) {
@@ -185,11 +150,8 @@ const ApprovalPrompt = forwardRef(
185
150
  [
186
151
  isElicitation,
187
152
  isEditOrWriteTool,
188
- isDirectoryAccess,
189
- hasToolDirectoryAccess,
190
153
  isPlanReview,
191
154
  options,
192
- suggestedPatterns,
193
155
  onApprove,
194
156
  onDeny,
195
157
  onCancel,
@@ -249,21 +211,9 @@ const ApprovalPrompt = forwardRef(
249
211
  return null;
250
212
  }
251
213
  };
252
- const directoryPath = approval.metadata.path;
253
- const parentDir = approval.metadata.parentDir;
254
- const operation = approval.metadata.operation;
255
- const directoryAccessTitle = !isDirectoryAccess ? null : operation === "read" ? "Read file" : operation === "write" ? "Write file" : operation === "edit" ? "Edit file" : "Directory access";
256
- const directoryAccessToolHeader = !isDirectoryAccess || !toolName ? null : formatToolHeader({
257
- toolName,
258
- args: directoryPath ?? parentDir ? { path: directoryPath ?? parentDir } : {},
259
- ...presentationSnapshot !== void 0 && { presentationSnapshot }
260
- }).header;
261
- const showHeaderBlock = isDirectoryAccess || isCommandApproval || !displayPreview;
214
+ const showHeaderBlock = isCommandApproval || !displayPreview;
262
215
  return /* @__PURE__ */ jsxs(Box, { paddingX: 0, paddingY: 0, flexDirection: "column", children: [
263
- showHeaderBlock && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 0, children: isDirectoryAccess ? /* @__PURE__ */ jsxs(Fragment, { children: [
264
- /* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: "cyan", bold: true, children: directoryAccessTitle ?? "Directory access" }) }),
265
- directoryAccessToolHeader && /* @__PURE__ */ jsx(Box, { marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { wrap: "wrap", children: directoryAccessToolHeader }) })
266
- ] }) : isCommandApproval ? /* @__PURE__ */ jsxs(Fragment, { children: [
216
+ showHeaderBlock && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 0, children: isCommandApproval ? /* @__PURE__ */ jsxs(Fragment, { children: [
267
217
  /* @__PURE__ */ jsx(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs(Text, { color: "yellowBright", bold: true, children: [
268
218
  "Confirm command:",
269
219
  " "
@@ -307,9 +307,7 @@ const OverlayContainer = (0, import_react.forwardRef)(
307
307
  hostRuntime: approval.hostRuntime,
308
308
  data: {
309
309
  rememberChoice: options.rememberChoice,
310
- rememberPattern: options.rememberPattern,
311
- formData: options.formData,
312
- rememberDirectory: options.rememberDirectory
310
+ formData: options.formData
313
311
  }
314
312
  });
315
313
  completeApproval();
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayContainer.d.ts","sourceRoot":"","sources":["../../src/containers/OverlayContainer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAyE,MAAM,OAAO,CAAC;AAI9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAGH,KAAK,eAAe,EACvB,MAAM,iCAAiC,CAAC;AAmGzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAuC3D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAuC3D,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,qBAAqB;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,eAAe,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AE,MAAM,GAAG,IAAI,CAAC;IAC9B,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sGA6+F5B,CAAC"}
@@ -287,9 +287,7 @@ const OverlayContainer = forwardRef(
287
287
  hostRuntime: approval.hostRuntime,
288
288
  data: {
289
289
  rememberChoice: options.rememberChoice,
290
- rememberPattern: options.rememberPattern,
291
- formData: options.formData,
292
- rememberDirectory: options.rememberDirectory
290
+ formData: options.formData
293
291
  }
294
292
  });
295
293
  completeApproval();
@@ -766,7 +766,7 @@ ${import_chalk.default.dim(callDescription)}`;
766
766
  const bypassPermissions = options.bypassPermissionsRef.current;
767
767
  const autoApproveEdits = options.autoApproveEditsRef.current;
768
768
  const { eventBus } = options;
769
- if (bypassPermissions && (event.type === import_core.ApprovalType.TOOL_APPROVAL || event.type === import_core.ApprovalType.COMMAND_APPROVAL || event.type === import_core.ApprovalType.DIRECTORY_ACCESS)) {
769
+ if (bypassPermissions && (event.type === import_core.ApprovalType.TOOL_APPROVAL || event.type === import_core.ApprovalType.COMMAND_APPROVAL)) {
770
770
  if (event.type === import_core.ApprovalType.TOOL_APPROVAL) {
771
771
  const { toolName } = event.metadata;
772
772
  if (toolName === "plan_create" || toolName === "plan_review") {
@@ -787,9 +787,8 @@ ${import_chalk.default.dim(callDescription)}`;
787
787
  break;
788
788
  }
789
789
  if (autoApproveEdits && event.type === import_core.ApprovalType.TOOL_APPROVAL) {
790
- const { toolName, directoryAccess } = event.metadata;
791
- const hasDirectoryAccess = typeof directoryAccess === "object" && directoryAccess !== null;
792
- if (!hasDirectoryAccess && (0, import_toolUtils.isAutoApprovableInEditMode)(toolName)) {
790
+ const { toolName, approvalKey } = event.metadata;
791
+ if (approvalKey === void 0 && (0, import_toolUtils.isAutoApprovableInEditMode)(toolName)) {
793
792
  eventBus.emit("approval:response", {
794
793
  approvalId: event.approvalId,
795
794
  status: import_core.ApprovalStatus.APPROVED,
@@ -805,7 +804,7 @@ ${import_chalk.default.dim(callDescription)}`;
805
804
  approvalIdToToolCallId.set(event.approvalId, toolCallId);
806
805
  updatePendingStatus(`tool-${toolCallId}`, "pending_approval");
807
806
  }
808
- if (event.type === import_core.ApprovalType.TOOL_APPROVAL || event.type === import_core.ApprovalType.COMMAND_APPROVAL || event.type === import_core.ApprovalType.ELICITATION || event.type === import_core.ApprovalType.DIRECTORY_ACCESS) {
807
+ if (event.type === import_core.ApprovalType.TOOL_APPROVAL || event.type === import_core.ApprovalType.COMMAND_APPROVAL || event.type === import_core.ApprovalType.ELICITATION) {
809
808
  const newApproval = {
810
809
  approvalId: event.approvalId,
811
810
  type: event.type,
@@ -1 +1 @@
1
- {"version":3,"file":"processStream.d.ts","sourceRoot":"","sources":["../../src/services/processStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,aAAa,CAAC;AAGvE,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAc,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAoEvE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,2DAA2D;IAC3D,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7D,oFAAoF;IACpF,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpE,iFAAiF;IACjF,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAA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I,CAAC,CAiuCf"}
@@ -733,7 +733,7 @@ ${chalk.dim(callDescription)}`;
733
733
  const bypassPermissions = options.bypassPermissionsRef.current;
734
734
  const autoApproveEdits = options.autoApproveEditsRef.current;
735
735
  const { eventBus } = options;
736
- if (bypassPermissions && (event.type === ApprovalTypeEnum.TOOL_APPROVAL || event.type === ApprovalTypeEnum.COMMAND_APPROVAL || event.type === ApprovalTypeEnum.DIRECTORY_ACCESS)) {
736
+ if (bypassPermissions && (event.type === ApprovalTypeEnum.TOOL_APPROVAL || event.type === ApprovalTypeEnum.COMMAND_APPROVAL)) {
737
737
  if (event.type === ApprovalTypeEnum.TOOL_APPROVAL) {
738
738
  const { toolName } = event.metadata;
739
739
  if (toolName === "plan_create" || toolName === "plan_review") {
@@ -754,9 +754,8 @@ ${chalk.dim(callDescription)}`;
754
754
  break;
755
755
  }
756
756
  if (autoApproveEdits && event.type === ApprovalTypeEnum.TOOL_APPROVAL) {
757
- const { toolName, directoryAccess } = event.metadata;
758
- const hasDirectoryAccess = typeof directoryAccess === "object" && directoryAccess !== null;
759
- if (!hasDirectoryAccess && isAutoApprovableInEditMode(toolName)) {
757
+ const { toolName, approvalKey } = event.metadata;
758
+ if (approvalKey === void 0 && isAutoApprovableInEditMode(toolName)) {
760
759
  eventBus.emit("approval:response", {
761
760
  approvalId: event.approvalId,
762
761
  status: ApprovalStatus.APPROVED,
@@ -772,7 +771,7 @@ ${chalk.dim(callDescription)}`;
772
771
  approvalIdToToolCallId.set(event.approvalId, toolCallId);
773
772
  updatePendingStatus(`tool-${toolCallId}`, "pending_approval");
774
773
  }
775
- if (event.type === ApprovalTypeEnum.TOOL_APPROVAL || event.type === ApprovalTypeEnum.COMMAND_APPROVAL || event.type === ApprovalTypeEnum.ELICITATION || event.type === ApprovalTypeEnum.DIRECTORY_ACCESS) {
774
+ if (event.type === ApprovalTypeEnum.TOOL_APPROVAL || event.type === ApprovalTypeEnum.COMMAND_APPROVAL || event.type === ApprovalTypeEnum.ELICITATION) {
776
775
  const newApproval = {
777
776
  approvalId: event.approvalId,
778
777
  type: event.type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/tui",
3
- "version": "1.8.11",
3
+ "version": "1.9.0",
4
4
  "description": "Interactive terminal UI for Dexto CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,10 +28,10 @@
28
28
  "string-width": "^8.1.0",
29
29
  "strip-ansi": "^7.1.2",
30
30
  "wrap-ansi": "^9.0.2",
31
- "@dexto/agent-management": "1.8.11",
32
- "@dexto/core": "1.8.11",
33
- "@dexto/llm": "1.8.11",
34
- "@dexto/registry": "1.8.11"
31
+ "@dexto/agent-management": "1.9.0",
32
+ "@dexto/core": "1.9.0",
33
+ "@dexto/llm": "1.9.0",
34
+ "@dexto/registry": "1.9.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/react": "^19.0.0",