@oxy-hq/sdk 2.4.0 → 2.5.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.
package/dist/shell.css CHANGED
@@ -669,10 +669,65 @@
669
669
  color: var(--oxy-shell-muted-fg);
670
670
  }
671
671
 
672
+ .oxy-askdock__history-search {
673
+ display: flex;
674
+ align-items: center;
675
+ gap: 0.5rem;
676
+ margin-bottom: 0.25rem;
677
+ padding: 0.5rem 0.625rem;
678
+ border: 1px solid var(--oxy-shell-border);
679
+ border-radius: var(--oxy-shell-radius);
680
+ color: var(--oxy-shell-muted-fg);
681
+ }
682
+
683
+ .oxy-askdock__history-search:focus-within {
684
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--oxy-shell-ring) 45%, transparent);
685
+ }
686
+
687
+ .oxy-askdock__history-search svg {
688
+ flex: none;
689
+ }
690
+
691
+ .oxy-askdock__history-searchinput {
692
+ flex: 1;
693
+ min-width: 0;
694
+ border: none;
695
+ background: transparent;
696
+ outline: none;
697
+ color: var(--oxy-shell-foreground);
698
+ font-family: var(--oxy-shell-font);
699
+ font-size: 13px;
700
+ }
701
+
702
+ .oxy-askdock__history-searchinput::placeholder {
703
+ color: var(--oxy-shell-muted-fg);
704
+ }
705
+
706
+ .oxy-askdock__history-more {
707
+ align-self: center;
708
+ margin-top: 0.25rem;
709
+ padding: 0.5rem 0.75rem;
710
+ border: none;
711
+ background: transparent;
712
+ color: var(--oxy-shell-muted-fg);
713
+ font-family: var(--oxy-shell-font);
714
+ font-size: 11px;
715
+ font-weight: 600;
716
+ letter-spacing: 0.05em;
717
+ text-transform: uppercase;
718
+ cursor: pointer;
719
+ transition: color 0.15s;
720
+ }
721
+
722
+ .oxy-askdock__history-more:hover {
723
+ color: var(--oxy-shell-foreground);
724
+ }
725
+
672
726
  .oxy-askdock__history-item {
673
727
  display: flex;
674
- flex-direction: column;
675
- gap: 0.125rem;
728
+ flex-direction: row;
729
+ align-items: center;
730
+ gap: 0.5rem;
676
731
  width: 100%;
677
732
  border: none;
678
733
  border-radius: calc(var(--oxy-shell-radius) - 2px);
@@ -684,6 +739,12 @@
684
739
  transition: background 0.15s;
685
740
  }
686
741
 
742
+ .oxy-askdock__history-icon {
743
+ display: inline-flex;
744
+ flex: none;
745
+ color: var(--oxy-shell-muted-fg);
746
+ }
747
+
687
748
  .oxy-askdock__history-item:hover {
688
749
  background: var(--oxy-shell-accent);
689
750
  }
@@ -693,7 +754,20 @@
693
754
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--oxy-shell-ring) 50%, transparent);
694
755
  }
695
756
 
757
+ /* The conversation currently open in the dock — kept in the list (not hidden)
758
+ and highlighted with the same background as :hover, plus a bolder title so
759
+ the current chat stays distinguishable from a merely-hovered one. */
760
+ .oxy-askdock__history-item--active {
761
+ background: var(--oxy-shell-accent);
762
+ }
763
+
764
+ .oxy-askdock__history-item--active .oxy-askdock__history-title {
765
+ font-weight: 600;
766
+ }
767
+
696
768
  .oxy-askdock__history-title {
769
+ flex: 1;
770
+ min-width: 0;
697
771
  overflow: hidden;
698
772
  text-overflow: ellipsis;
699
773
  white-space: nowrap;
@@ -701,9 +775,11 @@
701
775
  color: var(--oxy-shell-foreground);
702
776
  }
703
777
 
704
- .oxy-askdock__history-meta {
705
- font-size: 11px;
778
+ .oxy-askdock__history-time {
779
+ flex: none;
780
+ font-size: 12px;
706
781
  color: var(--oxy-shell-muted-fg);
782
+ white-space: nowrap;
707
783
  }
708
784
 
709
785
  .oxy-askdock__scroll {
package/dist/shell.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as AppFetcher, n as AgentRunEvent } from "./react-BLsczFL4.cjs";
2
+ import { a as AppFetcher, n as AgentRunEvent } from "./react-BnpR8VRJ.cjs";
3
3
  import * as React from "react";
4
4
  import { ReactNode } from "react";
5
5
  //#region src/shell/AnswerChart.d.ts
@@ -86,8 +86,8 @@ interface OxyShellProps {
86
86
  /** Extra right-side top bar content, rendered after the status cluster
87
87
  * (Sys · clock) and before the Ask Oxygen button. */
88
88
  topBarExtra?: ReactNode;
89
- /** Rail bottom slot content, rendered above the built-in Settings
90
- * entry (the account cluster in the main web-app). */
89
+ /** Rail bottom slot content. The shell adds no built-in entries here —
90
+ * a bundle that wants a Settings link supplies its own. */
91
91
  railBottom?: ReactNode;
92
92
  /** Drop the top bar and keep only the rail. */
93
93
  hideTopBar?: boolean;
@@ -103,12 +103,21 @@ interface OxyShellProps {
103
103
  * URLs. Leave unset in production. */
104
104
  productBaseUrl?: string;
105
105
  className?: string;
106
+ /** Background of the shell chrome — the icon rail, the top bar, and the
107
+ * AskDock (they share one token). Any CSS color, including `var(--…)` to
108
+ * track a host token (e.g. `var(--background)` to match the app's canvas).
109
+ * Overrides the theme's default; leave unset to keep it. */
110
+ chromeBackground?: string;
111
+ /** Text/icon color on the chrome, paired with `chromeBackground` for
112
+ * contrast when using a background outside the current light/dark family.
113
+ * Unset keeps the theme's foreground. */
114
+ chromeForeground?: string;
106
115
  }
107
116
  /**
108
117
  * The workspace chrome around a customer app: icon rail + universal top bar
109
118
  * + content column — visually identical to the main web-app shell.
110
119
  */
111
- declare function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey, productBaseUrl, className }: OxyShellProps): import("react").JSX.Element;
120
+ declare function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey, productBaseUrl, className, chromeBackground, chromeForeground }: OxyShellProps): import("react").JSX.Element;
112
121
  //#endregion
113
122
  //#region src/shell/trace.d.ts
114
123
  type TraceStepStatus = "running" | "done" | "failed" | "suspended";
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.cts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UC/WjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBA6Cc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7LF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UCoDtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAAa;;EAEb;;;EAGA;;;;;;;;EAQA;EACA;;;;;;iBAsDc,WACd,UACA,WACA,YACA,aACA,YACA,YACA,WACA,gBACA,aACC,gCAAa,IAAA;;;KCxKJ;UAEK;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;EACR,OAAO;;;;iBA8IO,gBAAgB,QAAQ,kBAAkB;;;UCvDzC;EACf,OAAO;;EAEP;;EAEA;IAAQ;IAAe;;EACvB;;;;iBAKc,iBAAiB,OAAO,WAAmB,KAAK,aAAa,sCAAmB,IAAA;;;;;;;KCxHpF;EACV;EACA;;;EAGA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;;;;;;iBAuDc,YACd,KACA,QACA,aACA,QACA;EAEA,MAAM;EACN,QAAQ;EACR,cAAc;EACd,SAAS;EACT;oBACD,IAAA;;;UC9EgB;EACf;EACA;EACA;;EAEA;EACA;;;EAGA;;EAEA;;UAGe;EACf;IAAa;IAAY;;EACzB;IAAO;IAAY;IAAc;;;EAEjC;;EAEA,MAAM;;;;EAIN;IAAS;IAAc;IAAiB;;;EAExC;IAAQ;IAAc;IAAe;;;UAGtB;EACf,MAAM;EACN;EACA,OAAO;;;;;;;;iBASO,mBAAmB;;;;;;;;iBC/CnB,eACd,SACA,MACA;EAEA,SAAS,MAAM;EACf;EACA,UAAU,MAAM;IACjB,MAAA,IAAA;;;;;iBCNe,SACd,MACA,OACA;EAEA,OAAO;EACP,QAAQ;EACR;oBACD,IAAA;;;;;;iBAqBe,aACd,gBACA,WACA,UACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;;;;;;iBAmDe,mCAAe,IAAA;;;;;;iBA+Bf,iBAAiB;EAAc;oBAAmB,IAAA;;;UCrHjD;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA,OAAO;;UAGQ;EACf,SAAS;EACT;EACA,OAAO;;EAEP;;;;;;;iBAQc,oBAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCpFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
1
+ {"version":3,"file":"shell.d.cts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBAuEc,UACd,SACA,eACA,aACA,aACA,MACA,SACA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qBe,aACd,gBACA,WACA,UACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;;;;;;iBAmDe,mCAAe,IAAA;;;;;;iBA+Bf,iBAAiB;EAAc;oBAAmB,IAAA;;;UCrHjD;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA,OAAO;;UAGQ;EACf,SAAS;EACT;EACA,OAAO;;EAEP;;;;;;;iBAQc,oBAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCpFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
package/dist/shell.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { a as AppFetcher, n as AgentRunEvent } from "./react-BLsczFL4.mjs";
2
+ import { a as AppFetcher, n as AgentRunEvent } from "./react-BnpR8VRJ.mjs";
3
3
  import * as React from "react";
4
4
  import { ReactNode } from "react";
5
5
  //#region src/shell/AnswerChart.d.ts
@@ -86,8 +86,8 @@ interface OxyShellProps {
86
86
  /** Extra right-side top bar content, rendered after the status cluster
87
87
  * (Sys · clock) and before the Ask Oxygen button. */
88
88
  topBarExtra?: ReactNode;
89
- /** Rail bottom slot content, rendered above the built-in Settings
90
- * entry (the account cluster in the main web-app). */
89
+ /** Rail bottom slot content. The shell adds no built-in entries here —
90
+ * a bundle that wants a Settings link supplies its own. */
91
91
  railBottom?: ReactNode;
92
92
  /** Drop the top bar and keep only the rail. */
93
93
  hideTopBar?: boolean;
@@ -103,12 +103,21 @@ interface OxyShellProps {
103
103
  * URLs. Leave unset in production. */
104
104
  productBaseUrl?: string;
105
105
  className?: string;
106
+ /** Background of the shell chrome — the icon rail, the top bar, and the
107
+ * AskDock (they share one token). Any CSS color, including `var(--…)` to
108
+ * track a host token (e.g. `var(--background)` to match the app's canvas).
109
+ * Overrides the theme's default; leave unset to keep it. */
110
+ chromeBackground?: string;
111
+ /** Text/icon color on the chrome, paired with `chromeBackground` for
112
+ * contrast when using a background outside the current light/dark family.
113
+ * Unset keeps the theme's foreground. */
114
+ chromeForeground?: string;
106
115
  }
107
116
  /**
108
117
  * The workspace chrome around a customer app: icon rail + universal top bar
109
118
  * + content column — visually identical to the main web-app shell.
110
119
  */
111
- declare function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey, productBaseUrl, className }: OxyShellProps): import("react").JSX.Element;
120
+ declare function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey, productBaseUrl, className, chromeBackground, chromeForeground }: OxyShellProps): import("react").JSX.Element;
112
121
  //#endregion
113
122
  //#region src/shell/trace.d.ts
114
123
  type TraceStepStatus = "running" | "done" | "failed" | "suspended";
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.mts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UC/WjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBA6Cc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7LF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UCoDtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAA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BAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCpFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
1
+ {"version":3,"file":"shell.d.mts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBAuEc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7PF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UC+BtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAAa;;EAEb;;;EAGA;;;;;;;;EAQA;EACA;;;;;EAKA;;;;EAIA;;;;;;iBAsDc,WACd,UACA,WACA,YACA,aACA,YACA,YACA,WACA,gBACA,WACA,kBACA,oBACC,gCAAa,IAAA;;;KC9JJ;UAEK;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;EACR,OAAO;;;;iBA8IO,gBAAgB,QAAQ,kBAAkB;;;UCvDzC;EACf,OAAO;;EAEP;;EAEA;IAAQ;IAAe;;EACvB;;;;iBAKc,iBAAiB,OAAO,WAAmB,KAAK,aAAa,sCAAmB,IAAA;;;;;;;KCxHpF;EACV;EACA;;;EAGA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;;;;;;iBAuDc,YACd,KACA,QACA,aACA,QACA;EAEA,MAAM;EACN,QAAQ;EACR,cAAc;EACd,SAAS;EACT;oBACD,IAAA;;;UC9EgB;EACf;EACA;EACA;;EAEA;EACA;;;EAGA;;EAEA;;UAGe;EACf;IAAa;IAAY;;EACzB;IAAO;IAAY;IAAc;;;EAEjC;;EAEA,MAAM;;;;EAIN;IAAS;IAAc;IAAiB;;;EAExC;IAAQ;IAAc;IAAe;;;UAGtB;EACf,MAAM;EACN;EACA,OAAO;;;;;;;;iBASO,mBAAmB;;;;;;;;iBC/CnB,eACd,SACA,MACA;EAEA,SAAS,MAAM;EACf;EACA,UAAU,MAAM;IACjB,MAAA,IAAA;;;;;iBCNe,SACd,MACA,OACA;EAEA,OAAO;EACP,QAAQ;EACR;oBACD,IAAA;;;;;;iBAqBe,aACd,gBACA,WACA,UACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;;;;;;iBAmDe,mCAAe,IAAA;;;;;;iBA+Bf,iBAAiB;EAAc;oBAAmB,IAAA;;;UCrHjD;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA,OAAO;;UAGQ;EACf,SAAS;EACT;EACA,OAAO;;EAEP;;;;;;;iBAQc,oBAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCpFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
package/dist/shell.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // @oxy/sdk - TypeScript SDK for Oxy data platform
2
- import { i as useAgentRun, l as useResolvedManifest, o as useOxyApp, t as OxyAnswer, v as getOxyAppLogger } from "./react-DArzs6_l.mjs";
2
+ import { i as useAgentRun, l as useResolvedManifest, o as useOxyApp, t as OxyAnswer, v as getOxyAppLogger } from "./react-CVdWXcu8.mjs";
3
3
  import * as React from "react";
4
4
  import { Fragment, useEffect, useMemo, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1187,6 +1187,38 @@ function HistoryIcon() {
1187
1187
  ]
1188
1188
  });
1189
1189
  }
1190
+ function SearchIcon() {
1191
+ return /* @__PURE__ */ jsxs("svg", {
1192
+ width: "14",
1193
+ height: "14",
1194
+ viewBox: "0 0 24 24",
1195
+ fill: "none",
1196
+ stroke: "currentColor",
1197
+ strokeWidth: "2",
1198
+ strokeLinecap: "round",
1199
+ strokeLinejoin: "round",
1200
+ "aria-hidden": "true",
1201
+ children: [/* @__PURE__ */ jsx("circle", {
1202
+ cx: "11",
1203
+ cy: "11",
1204
+ r: "8"
1205
+ }), /* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })]
1206
+ });
1207
+ }
1208
+ function ThreadIcon() {
1209
+ return /* @__PURE__ */ jsxs("svg", {
1210
+ width: "15",
1211
+ height: "15",
1212
+ viewBox: "0 0 24 24",
1213
+ fill: "none",
1214
+ stroke: "currentColor",
1215
+ strokeWidth: "2",
1216
+ strokeLinecap: "round",
1217
+ strokeLinejoin: "round",
1218
+ "aria-hidden": "true",
1219
+ children: [/* @__PURE__ */ jsx("path", { d: "M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z" }), /* @__PURE__ */ jsx("path", { d: "M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1" })]
1220
+ });
1221
+ }
1190
1222
  function ExternalIcon() {
1191
1223
  return /* @__PURE__ */ jsxs("svg", {
1192
1224
  width: "14",
@@ -1238,6 +1270,26 @@ function StopIcon() {
1238
1270
  function chartsFrom(events) {
1239
1271
  return events.filter((ev) => ev.type === "chart_rendered").map((ev) => ev.data).filter((b) => b?.config && Array.isArray(b.columns) && Array.isArray(b.rows));
1240
1272
  }
1273
+ /** History label: a relative "N minutes/hours/days ago" for when the
1274
+ * conversation was started. */
1275
+ function formatHistoryTime(iso) {
1276
+ const d = new Date(iso);
1277
+ if (Number.isNaN(d.getTime())) return "";
1278
+ const s = Math.max(0, Math.round((Date.now() - d.getTime()) / 1e3));
1279
+ if (s < 45) return "just now";
1280
+ const min = Math.round(s / 60);
1281
+ if (min < 60) return `${min} minute${min === 1 ? "" : "s"} ago`;
1282
+ const hr = Math.round(s / 3600);
1283
+ if (hr < 24) return `${hr} hour${hr === 1 ? "" : "s"} ago`;
1284
+ const day = Math.round(s / 86400);
1285
+ if (day < 30) return `${day} day${day === 1 ? "" : "s"} ago`;
1286
+ const mo = Math.round(day / 30);
1287
+ if (mo < 12) return `${mo} month${mo === 1 ? "" : "s"} ago`;
1288
+ const yr = Math.round(day / 365);
1289
+ return `${yr} year${yr === 1 ? "" : "s"} ago`;
1290
+ }
1291
+ /** How many history rows to show before the "Show more" button. */
1292
+ const HISTORY_PAGE_SIZE = 12;
1241
1293
  /** Rebuild a completed turn from a transcript turn's processed events —
1242
1294
  * identical to what the live dock accumulates during a run. */
1243
1295
  function turnFromEvents(question, events) {
@@ -1263,9 +1315,12 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1263
1315
  const [threadId, setThreadId] = React.useState(null);
1264
1316
  const [history, setHistory] = React.useState([]);
1265
1317
  const [historyOpen, setHistoryOpen] = React.useState(false);
1318
+ const [historyQuery, setHistoryQuery] = React.useState("");
1319
+ const [historyShown, setHistoryShown] = React.useState(HISTORY_PAGE_SIZE);
1266
1320
  const [restoring, setRestoring] = React.useState(false);
1267
1321
  const scrollRef = React.useRef(null);
1268
1322
  const restoreGenRef = React.useRef(0);
1323
+ const startedAtRef = React.useRef(null);
1269
1324
  const busy = run.state === "running";
1270
1325
  const liveSteps = React.useMemo(() => buildTraceSteps(run.events), [run.events]);
1271
1326
  const liveLlm = React.useMemo(() => aggregateLlmStats(run.events), [run.events]);
@@ -1289,7 +1344,8 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1289
1344
  id: threadId ?? all[0].question,
1290
1345
  title: all[0].question,
1291
1346
  turns: all,
1292
- threadId
1347
+ threadId,
1348
+ createdAt: startedAtRef.current ?? (/* @__PURE__ */ new Date()).toISOString()
1293
1349
  };
1294
1350
  };
1295
1351
  const resetToEmpty = () => {
@@ -1299,6 +1355,7 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1299
1355
  setPending(null);
1300
1356
  setDraft("");
1301
1357
  setThreadId(null);
1358
+ startedAtRef.current = null;
1302
1359
  };
1303
1360
  const newChat = () => {
1304
1361
  const snap = snapshotCurrent();
@@ -1332,6 +1389,7 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1332
1389
  setPending(null);
1333
1390
  setDraft("");
1334
1391
  setThreadId(id);
1392
+ startedAtRef.current = serverThreads.find((t) => t.id === id)?.created_at ?? (/* @__PURE__ */ new Date()).toISOString();
1335
1393
  setHistoryOpen(false);
1336
1394
  setRestoring(true);
1337
1395
  try {
@@ -1346,6 +1404,7 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1346
1404
  const question = raw.trim();
1347
1405
  if (!question || busy) return;
1348
1406
  restoreGenRef.current += 1;
1407
+ if (startedAtRef.current === null) startedAtRef.current = (/* @__PURE__ */ new Date()).toISOString();
1349
1408
  if (pending !== null) {
1350
1409
  const finalized = finalizedPendingTurn();
1351
1410
  if (finalized) setTurns((t) => [...t, finalized]);
@@ -1361,16 +1420,31 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1361
1420
  });
1362
1421
  const empty = pending === null && turns.length === 0;
1363
1422
  const canNewChat = !empty;
1364
- const historyEntries = [...history.filter((c) => c.id !== threadId).map((c) => ({
1423
+ const currentId = threadId ?? turns[0]?.question ?? pending ?? null;
1424
+ const historyEntries = [...history.map((c) => ({
1365
1425
  id: c.id,
1366
1426
  title: c.title,
1367
- meta: `${c.turns.length} message${c.turns.length === 1 ? "" : "s"}`,
1368
- onOpen: () => openConversation(c)
1369
- })), ...serverThreads.filter((t) => t.id !== threadId && !history.some((c) => c.id === t.id)).map((t) => ({
1427
+ createdAt: c.createdAt,
1428
+ active: c.id === currentId,
1429
+ onOpen: c.id === currentId ? () => setHistoryOpen(false) : () => openConversation(c)
1430
+ })), ...serverThreads.filter((t) => !history.some((c) => c.id === t.id)).map((t) => ({
1370
1431
  id: t.id,
1371
1432
  title: t.title,
1372
- onOpen: () => void openServerThread(t.id)
1433
+ createdAt: t.created_at,
1434
+ active: t.id === currentId,
1435
+ onOpen: t.id === currentId ? () => setHistoryOpen(false) : () => void openServerThread(t.id)
1373
1436
  }))];
1437
+ if (!empty && currentId != null && !historyEntries.some((e) => e.id === currentId)) historyEntries.push({
1438
+ id: currentId,
1439
+ title: turns[0]?.question ?? pending ?? currentId,
1440
+ createdAt: startedAtRef.current ?? (/* @__PURE__ */ new Date()).toISOString(),
1441
+ active: true,
1442
+ onOpen: () => setHistoryOpen(false)
1443
+ });
1444
+ historyEntries.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
1445
+ const q = historyQuery.trim().toLowerCase();
1446
+ const filteredEntries = q ? historyEntries.filter((e) => e.title.toLowerCase().includes(q)) : historyEntries;
1447
+ const visibleEntries = filteredEntries.slice(0, historyShown);
1374
1448
  const placeholder = run.state === "needs_clarification" ? "Reply…" : pending !== null ? "Ask a follow-up…" : `Ask Oxygen anything about ${workspaceName ?? "your workspace"}…`;
1375
1449
  return /* @__PURE__ */ jsxs("aside", {
1376
1450
  className: cx("oxy-shell-scope oxy-askdock", !open && "oxy-askdock--closed", className),
@@ -1403,7 +1477,11 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1403
1477
  onClick: () => {
1404
1478
  const next = !historyOpen;
1405
1479
  setHistoryOpen(next);
1406
- if (next) refetchHistory();
1480
+ if (next) {
1481
+ refetchHistory();
1482
+ setHistoryQuery("");
1483
+ setHistoryShown(HISTORY_PAGE_SIZE);
1484
+ }
1407
1485
  },
1408
1486
  "data-testid": "askdock-history",
1409
1487
  "aria-label": "Chat history",
@@ -1428,24 +1506,51 @@ function AskDock({ agentId, workspaceName, suggestions = [], threadsHref, open,
1428
1506
  ]
1429
1507
  })
1430
1508
  ]
1431
- }), historyOpen ? /* @__PURE__ */ jsx("div", {
1509
+ }), historyOpen ? /* @__PURE__ */ jsxs("div", {
1432
1510
  className: "oxy-askdock__history",
1433
1511
  "data-testid": "askdock-history-panel",
1434
- children: historyEntries.length === 0 ? /* @__PURE__ */ jsx("p", {
1512
+ children: [/* @__PURE__ */ jsxs("div", {
1513
+ className: "oxy-askdock__history-search",
1514
+ children: [/* @__PURE__ */ jsx(SearchIcon, {}), /* @__PURE__ */ jsx("input", {
1515
+ type: "text",
1516
+ className: "oxy-askdock__history-searchinput",
1517
+ placeholder: "Search threads…",
1518
+ value: historyQuery,
1519
+ onChange: (e) => {
1520
+ setHistoryQuery(e.target.value);
1521
+ setHistoryShown(HISTORY_PAGE_SIZE);
1522
+ },
1523
+ "aria-label": "Search threads"
1524
+ })]
1525
+ }), visibleEntries.length === 0 ? /* @__PURE__ */ jsx("p", {
1435
1526
  className: "oxy-askdock__history-empty",
1436
- children: "No previous chats yet."
1437
- }) : historyEntries.map((entry) => /* @__PURE__ */ jsxs("button", {
1527
+ children: historyQuery ? "No matching chats." : "No previous chats yet."
1528
+ }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [visibleEntries.map((entry) => /* @__PURE__ */ jsxs("button", {
1438
1529
  type: "button",
1439
- className: "oxy-askdock__history-item",
1530
+ className: cx("oxy-askdock__history-item", entry.active && "oxy-askdock__history-item--active"),
1440
1531
  onClick: entry.onOpen,
1441
- children: [/* @__PURE__ */ jsx("span", {
1442
- className: "oxy-askdock__history-title",
1443
- children: entry.title
1444
- }), entry.meta && /* @__PURE__ */ jsx("span", {
1445
- className: "oxy-askdock__history-meta",
1446
- children: entry.meta
1447
- })]
1448
- }, entry.id))
1532
+ title: entry.title,
1533
+ "aria-current": entry.active ? "true" : void 0,
1534
+ children: [
1535
+ /* @__PURE__ */ jsx("span", {
1536
+ className: "oxy-askdock__history-icon",
1537
+ children: /* @__PURE__ */ jsx(ThreadIcon, {})
1538
+ }),
1539
+ /* @__PURE__ */ jsx("span", {
1540
+ className: "oxy-askdock__history-title",
1541
+ children: entry.title
1542
+ }),
1543
+ /* @__PURE__ */ jsx("span", {
1544
+ className: "oxy-askdock__history-time",
1545
+ children: formatHistoryTime(entry.createdAt)
1546
+ })
1547
+ ]
1548
+ }, entry.id)), filteredEntries.length > visibleEntries.length && /* @__PURE__ */ jsx("button", {
1549
+ type: "button",
1550
+ className: "oxy-askdock__history-more",
1551
+ onClick: () => setHistoryShown((n) => n + HISTORY_PAGE_SIZE),
1552
+ children: "Show more"
1553
+ })] })]
1449
1554
  }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
1450
1555
  className: "oxy-askdock__scroll",
1451
1556
  ref: scrollRef,
@@ -1905,25 +2010,6 @@ function MessagesIcon() {
1905
2010
  children: [/* @__PURE__ */ jsx("path", { d: "M16 10a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" }), /* @__PURE__ */ jsx("path", { d: "M20 9a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1" })]
1906
2011
  });
1907
2012
  }
1908
- /** Settings glyph (lucide "settings" outline, inlined). */
1909
- function GearIcon() {
1910
- return /* @__PURE__ */ jsxs("svg", {
1911
- width: "16",
1912
- height: "16",
1913
- viewBox: "0 0 24 24",
1914
- fill: "none",
1915
- stroke: "currentColor",
1916
- strokeWidth: "2",
1917
- strokeLinecap: "round",
1918
- strokeLinejoin: "round",
1919
- "aria-hidden": "true",
1920
- children: [/* @__PURE__ */ jsx("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }), /* @__PURE__ */ jsx("circle", {
1921
- cx: "12",
1922
- cy: "12",
1923
- r: "3"
1924
- })]
1925
- });
1926
- }
1927
2013
  /** Rewrite a shell-context relative product path to an absolute URL against
1928
2014
  * the oxy origin, when one is configured. `/api/*` paths are left relative
1929
2015
  * — they ride the host's same-origin fetch / dev proxy (which attaches
@@ -1966,8 +2052,15 @@ function buildRailGroups(data, currentAppSlug, abs) {
1966
2052
  * The workspace chrome around a customer app: icon rail + universal top bar
1967
2053
  * + content column — visually identical to the main web-app shell.
1968
2054
  */
1969
- function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey = true, productBaseUrl, className }) {
2055
+ function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hideTopBar, askHotkey = true, productBaseUrl, className, chromeBackground, chromeForeground }) {
1970
2056
  const abs = makeAbs(productBaseUrl);
2057
+ const chromeStyle = {
2058
+ ...chromeBackground ? { "--sidebar-background": chromeBackground } : {},
2059
+ ...chromeForeground ? {
2060
+ "--foreground": chromeForeground,
2061
+ "--muted-foreground": `color-mix(in srgb, ${chromeForeground} 65%, transparent)`
2062
+ } : {}
2063
+ };
1971
2064
  const { appSlug } = useOxyApp();
1972
2065
  const { manifest } = useResolvedManifest();
1973
2066
  const { data, loading } = useShellContext();
@@ -1990,22 +2083,13 @@ function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hi
1990
2083
  window.addEventListener("keydown", onKey);
1991
2084
  return () => window.removeEventListener("keydown", onKey);
1992
2085
  }, [askAgent, askHotkey]);
1993
- const settingsEntry = data?.links.settings ? /* @__PURE__ */ jsx(ShellTooltip, {
1994
- content: "Settings",
1995
- children: /* @__PURE__ */ jsx("a", {
1996
- href: abs(data.links.settings),
1997
- "aria-label": "Settings",
1998
- "data-testid": "rail-settings",
1999
- className: "oxy-rail__item",
2000
- children: /* @__PURE__ */ jsx(GearIcon, {})
2001
- })
2002
- }) : null;
2003
- const bottom = railBottom || settingsEntry ? /* @__PURE__ */ jsxs(Fragment$1, { children: [railBottom, settingsEntry] }) : void 0;
2086
+ const bottom = railBottom;
2004
2087
  return /* @__PURE__ */ jsx(ShellPortalContext.Provider, {
2005
2088
  value: container,
2006
2089
  children: /* @__PURE__ */ jsxs("div", {
2007
2090
  ref: setContainer,
2008
2091
  className: cx("oxy-shell-scope oxy-shell", degraded && "oxy-shell--degraded", className),
2092
+ style: chromeStyle,
2009
2093
  children: [
2010
2094
  !degraded && /* @__PURE__ */ jsx(ShellRail, {
2011
2095
  top: data ? /* @__PURE__ */ jsx(WorkspaceTile, {