@hoilab/ada-cli 0.84.13 → 0.84.16

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.
@@ -2925,6 +2925,15 @@ export class InteractiveMode {
2925
2925
  }
2926
2926
  case "custom": {
2927
2927
  if (message.display) {
2928
+ if (message.customType === "sensitive-notice") {
2929
+ // Persistent, highlighted in-chat security notice
2930
+ // (sensitive data will not be stored in memory).
2931
+ const text = customMessageText(message.content);
2932
+ this.chatContainer.addChild(new Spacer(1));
2933
+ this.chatContainer.addChild(new Text(theme.fg("warning", "⚠️ ") + theme.bold(theme.fg("warning", "Ada Memory")) +
2934
+ "\n" + text, 1, 0));
2935
+ break;
2936
+ }
2928
2937
  const renderer = this.session.extensionRunner.getMessageRenderer(message.customType);
2929
2938
  const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad);
2930
2939
  component.setExpanded(this.toolOutputExpanded);
@@ -5592,4 +5601,19 @@ export class InteractiveMode {
5592
5601
  this.unregisterSignalHandlers();
5593
5602
  }
5594
5603
  }
5604
+ function customMessageText(content) {
5605
+ if (typeof content === "string")
5606
+ return content;
5607
+ if (!Array.isArray(content))
5608
+ return "";
5609
+ const parts = [];
5610
+ for (const block of content) {
5611
+ if (block && typeof block === "object" && block.type === "text") {
5612
+ const text = block.text;
5613
+ if (typeof text === "string")
5614
+ parts.push(text);
5615
+ }
5616
+ }
5617
+ return parts.join("\n");
5618
+ }
5595
5619
  //# sourceMappingURL=interactive-mode.js.map