@industry-theme/file-city-panel 0.2.20 → 0.2.21

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.
@@ -106,7 +106,7 @@ const createLucideIcon = (iconName, iconNode) => {
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
108
  */
109
- const __iconNode$5 = [
109
+ const __iconNode$b = [
110
110
  [
111
111
  "path",
112
112
  {
@@ -115,14 +115,14 @@ const __iconNode$5 = [
115
115
  }
116
116
  ]
117
117
  ];
118
- const Activity = createLucideIcon("activity", __iconNode$5);
118
+ const Activity = createLucideIcon("activity", __iconNode$b);
119
119
  /**
120
120
  * @license lucide-react v0.552.0 - ISC
121
121
  *
122
122
  * This source code is licensed under the ISC license.
123
123
  * See the LICENSE file in the root directory of this source tree.
124
124
  */
125
- const __iconNode$4 = [
125
+ const __iconNode$a = [
126
126
  ["path", { d: "M10 12h4", key: "a56b0p" }],
127
127
  ["path", { d: "M10 8h4", key: "1sr2af" }],
128
128
  ["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
@@ -135,27 +135,105 @@ const __iconNode$4 = [
135
135
  ],
136
136
  ["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
137
137
  ];
138
- const Building2 = createLucideIcon("building-2", __iconNode$4);
138
+ const Building2 = createLucideIcon("building-2", __iconNode$a);
139
139
  /**
140
140
  * @license lucide-react v0.552.0 - ISC
141
141
  *
142
142
  * This source code is licensed under the ISC license.
143
143
  * See the LICENSE file in the root directory of this source tree.
144
144
  */
145
- const __iconNode$3 = [
145
+ const __iconNode$9 = [
146
146
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
147
147
  ["path", { d: "M18 17V9", key: "2bz60n" }],
148
148
  ["path", { d: "M13 17V5", key: "1frdt8" }],
149
149
  ["path", { d: "M8 17v-3", key: "17ska0" }]
150
150
  ];
151
- const ChartColumn = createLucideIcon("chart-column", __iconNode$3);
151
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$9);
152
152
  /**
153
153
  * @license lucide-react v0.552.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
157
  */
158
- const __iconNode$2 = [
158
+ const __iconNode$8 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
159
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$8);
160
+ /**
161
+ * @license lucide-react v0.552.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */
166
+ const __iconNode$7 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
167
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$7);
168
+ /**
169
+ * @license lucide-react v0.552.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */
174
+ const __iconNode$6 = [
175
+ [
176
+ "path",
177
+ {
178
+ d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
179
+ key: "ct8e1f"
180
+ }
181
+ ],
182
+ ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
183
+ [
184
+ "path",
185
+ {
186
+ d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
187
+ key: "13bj9a"
188
+ }
189
+ ],
190
+ ["path", { d: "m2 2 20 20", key: "1ooewy" }]
191
+ ];
192
+ const EyeOff = createLucideIcon("eye-off", __iconNode$6);
193
+ /**
194
+ * @license lucide-react v0.552.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */
199
+ const __iconNode$5 = [
200
+ [
201
+ "path",
202
+ {
203
+ d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
204
+ key: "1nclc0"
205
+ }
206
+ ],
207
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
208
+ ];
209
+ const Eye = createLucideIcon("eye", __iconNode$5);
210
+ /**
211
+ * @license lucide-react v0.552.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */
216
+ const __iconNode$4 = [
217
+ [
218
+ "path",
219
+ {
220
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
221
+ key: "1oefj6"
222
+ }
223
+ ],
224
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
225
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
226
+ ["path", { d: "M16 13H8", key: "t4e002" }],
227
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
228
+ ];
229
+ const FileText = createLucideIcon("file-text", __iconNode$4);
230
+ /**
231
+ * @license lucide-react v0.552.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */
236
+ const __iconNode$3 = [
159
237
  [
160
238
  "path",
161
239
  {
@@ -165,14 +243,14 @@ const __iconNode$2 = [
165
243
  ],
166
244
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
167
245
  ];
168
- const File = createLucideIcon("file", __iconNode$2);
246
+ const File = createLucideIcon("file", __iconNode$3);
169
247
  /**
170
248
  * @license lucide-react v0.552.0 - ISC
171
249
  *
172
250
  * This source code is licensed under the ISC license.
173
251
  * See the LICENSE file in the root directory of this source tree.
174
252
  */
175
- const __iconNode$1 = [
253
+ const __iconNode$2 = [
176
254
  [
177
255
  "path",
178
256
  {
@@ -181,7 +259,20 @@ const __iconNode$1 = [
181
259
  }
182
260
  ]
183
261
  ];
184
- const Folder = createLucideIcon("folder", __iconNode$1);
262
+ const Folder = createLucideIcon("folder", __iconNode$2);
263
+ /**
264
+ * @license lucide-react v0.552.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */
269
+ const __iconNode$1 = [
270
+ ["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
271
+ ["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
272
+ ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
273
+ ["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
274
+ ];
275
+ const GitBranch = createLucideIcon("git-branch", __iconNode$1);
185
276
  /**
186
277
  * @license lucide-react v0.552.0 - ISC
187
278
  *
@@ -2628,6 +2719,609 @@ const Legend = ({
2628
2719
  }
2629
2720
  );
2630
2721
  };
2722
+ const AgentActivityView = ({
2723
+ layers,
2724
+ onLayerClick,
2725
+ onClearAll,
2726
+ showHeader = true
2727
+ }) => {
2728
+ const { theme: theme2 } = useTheme();
2729
+ const [expandedLayers, setExpandedLayers] = React.useState(/* @__PURE__ */ new Set());
2730
+ const toggleExpanded = (id2) => {
2731
+ setExpandedLayers((prev) => {
2732
+ const next = new Set(prev);
2733
+ if (next.has(id2)) {
2734
+ next.delete(id2);
2735
+ } else {
2736
+ next.add(id2);
2737
+ }
2738
+ return next;
2739
+ });
2740
+ };
2741
+ const formatTimestamp = (timestamp) => {
2742
+ const date = new Date(timestamp);
2743
+ return date.toLocaleTimeString(void 0, {
2744
+ hour: "2-digit",
2745
+ minute: "2-digit",
2746
+ second: "2-digit"
2747
+ });
2748
+ };
2749
+ const getFileName = (path) => {
2750
+ const parts = path.split("/");
2751
+ return parts[parts.length - 1];
2752
+ };
2753
+ const getDirectory = (path) => {
2754
+ const parts = path.split("/");
2755
+ if (parts.length <= 1) return "";
2756
+ return parts.slice(0, -1).join("/");
2757
+ };
2758
+ if (layers.length === 0) {
2759
+ return /* @__PURE__ */ jsxs(
2760
+ "div",
2761
+ {
2762
+ style: {
2763
+ display: "flex",
2764
+ flexDirection: "column",
2765
+ flex: 1,
2766
+ backgroundColor: theme2.colors.background,
2767
+ ...showHeader && {
2768
+ border: `1px solid ${theme2.colors.border}`,
2769
+ borderRadius: "6px"
2770
+ },
2771
+ overflow: "hidden"
2772
+ },
2773
+ children: [
2774
+ showHeader && /* @__PURE__ */ jsx(
2775
+ "div",
2776
+ {
2777
+ style: {
2778
+ display: "flex",
2779
+ alignItems: "center",
2780
+ justifyContent: "space-between",
2781
+ padding: "12px 16px",
2782
+ backgroundColor: theme2.colors.backgroundLight,
2783
+ borderBottom: `1px solid ${theme2.colors.border}`
2784
+ },
2785
+ children: /* @__PURE__ */ jsxs(
2786
+ "div",
2787
+ {
2788
+ style: {
2789
+ display: "flex",
2790
+ alignItems: "center",
2791
+ gap: "8px",
2792
+ color: theme2.colors.primary,
2793
+ fontFamily: theme2.fonts.body,
2794
+ fontWeight: 600,
2795
+ fontSize: theme2.fontSizes[1]
2796
+ },
2797
+ children: [
2798
+ /* @__PURE__ */ jsx(Activity, { size: 16 }),
2799
+ "Agent Activity"
2800
+ ]
2801
+ }
2802
+ )
2803
+ }
2804
+ ),
2805
+ /* @__PURE__ */ jsxs(
2806
+ "div",
2807
+ {
2808
+ style: {
2809
+ display: "flex",
2810
+ flexDirection: "column",
2811
+ alignItems: "center",
2812
+ justifyContent: "center",
2813
+ flex: 1,
2814
+ padding: "32px 16px",
2815
+ color: theme2.colors.textSecondary,
2816
+ fontFamily: theme2.fonts.body,
2817
+ fontSize: theme2.fontSizes[0]
2818
+ },
2819
+ children: [
2820
+ /* @__PURE__ */ jsx(Activity, { size: 32, style: { opacity: 0.3, marginBottom: "8px" } }),
2821
+ /* @__PURE__ */ jsx("span", { children: "No agent activity yet" })
2822
+ ]
2823
+ }
2824
+ )
2825
+ ]
2826
+ }
2827
+ );
2828
+ }
2829
+ return /* @__PURE__ */ jsxs(
2830
+ "div",
2831
+ {
2832
+ style: {
2833
+ display: "flex",
2834
+ flexDirection: "column",
2835
+ flex: 1,
2836
+ backgroundColor: theme2.colors.background,
2837
+ ...showHeader && {
2838
+ border: `1px solid ${theme2.colors.border}`,
2839
+ borderRadius: "6px"
2840
+ },
2841
+ overflow: "hidden"
2842
+ },
2843
+ children: [
2844
+ showHeader && /* @__PURE__ */ jsxs(
2845
+ "div",
2846
+ {
2847
+ style: {
2848
+ display: "flex",
2849
+ alignItems: "center",
2850
+ justifyContent: "space-between",
2851
+ padding: "12px 16px",
2852
+ backgroundColor: theme2.colors.backgroundLight,
2853
+ borderBottom: `1px solid ${theme2.colors.border}`,
2854
+ flexShrink: 0
2855
+ },
2856
+ children: [
2857
+ /* @__PURE__ */ jsxs(
2858
+ "div",
2859
+ {
2860
+ style: {
2861
+ display: "flex",
2862
+ alignItems: "center",
2863
+ gap: "8px",
2864
+ color: theme2.colors.primary,
2865
+ fontFamily: theme2.fonts.body,
2866
+ fontWeight: 600,
2867
+ fontSize: theme2.fontSizes[1]
2868
+ },
2869
+ children: [
2870
+ /* @__PURE__ */ jsx(Activity, { size: 16 }),
2871
+ "Agent Activity",
2872
+ /* @__PURE__ */ jsx(
2873
+ "span",
2874
+ {
2875
+ style: {
2876
+ backgroundColor: theme2.colors.primary,
2877
+ color: theme2.colors.background,
2878
+ padding: "2px 8px",
2879
+ borderRadius: "10px",
2880
+ fontSize: theme2.fontSizes[0],
2881
+ fontWeight: 500
2882
+ },
2883
+ children: layers.length
2884
+ }
2885
+ )
2886
+ ]
2887
+ }
2888
+ ),
2889
+ onClearAll && /* @__PURE__ */ jsxs(
2890
+ "button",
2891
+ {
2892
+ onClick: onClearAll,
2893
+ style: {
2894
+ display: "flex",
2895
+ alignItems: "center",
2896
+ gap: "4px",
2897
+ padding: "4px 10px",
2898
+ fontSize: theme2.fontSizes[0],
2899
+ fontFamily: theme2.fonts.body,
2900
+ color: theme2.colors.textSecondary,
2901
+ backgroundColor: "transparent",
2902
+ border: `1px solid ${theme2.colors.border}`,
2903
+ borderRadius: "4px",
2904
+ cursor: "pointer",
2905
+ transition: "all 0.15s ease"
2906
+ },
2907
+ title: "Clear all agent activity",
2908
+ children: [
2909
+ /* @__PURE__ */ jsx(X, { size: 12 }),
2910
+ "Clear All"
2911
+ ]
2912
+ }
2913
+ )
2914
+ ]
2915
+ }
2916
+ ),
2917
+ /* @__PURE__ */ jsx(
2918
+ "div",
2919
+ {
2920
+ style: {
2921
+ display: "flex",
2922
+ flexDirection: "column",
2923
+ flex: 1,
2924
+ overflowY: "auto"
2925
+ },
2926
+ children: [...layers].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0)).map((layer, index) => {
2927
+ const isExpanded = expandedLayers.has(layer.id);
2928
+ const fileCount = layer.items.length;
2929
+ return /* @__PURE__ */ jsxs(
2930
+ "div",
2931
+ {
2932
+ style: {
2933
+ borderBottom: index < layers.length - 1 ? `1px solid ${theme2.colors.border}` : "none"
2934
+ },
2935
+ children: [
2936
+ /* @__PURE__ */ jsxs(
2937
+ "div",
2938
+ {
2939
+ onClick: () => toggleExpanded(layer.id),
2940
+ style: {
2941
+ display: "flex",
2942
+ alignItems: "center",
2943
+ gap: "12px",
2944
+ padding: "12px 16px",
2945
+ backgroundColor: layer.enabled ? "transparent" : `${theme2.colors.backgroundLight}`,
2946
+ opacity: layer.enabled ? 1 : 0.6,
2947
+ cursor: "pointer",
2948
+ transition: "all 0.15s ease"
2949
+ },
2950
+ children: [
2951
+ /* @__PURE__ */ jsx(
2952
+ "div",
2953
+ {
2954
+ style: {
2955
+ display: "flex",
2956
+ alignItems: "center",
2957
+ justifyContent: "center",
2958
+ width: "20px",
2959
+ height: "20px",
2960
+ color: theme2.colors.textSecondary,
2961
+ flexShrink: 0
2962
+ },
2963
+ children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16 })
2964
+ }
2965
+ ),
2966
+ /* @__PURE__ */ jsx(
2967
+ "div",
2968
+ {
2969
+ style: {
2970
+ width: "16px",
2971
+ height: "16px",
2972
+ backgroundColor: layer.color,
2973
+ borderRadius: "4px",
2974
+ flexShrink: 0,
2975
+ boxShadow: `0 0 8px ${layer.color}60`
2976
+ }
2977
+ }
2978
+ ),
2979
+ /* @__PURE__ */ jsxs(
2980
+ "div",
2981
+ {
2982
+ style: {
2983
+ display: "flex",
2984
+ flexDirection: "column",
2985
+ gap: "2px",
2986
+ flex: 1,
2987
+ minWidth: 0
2988
+ },
2989
+ children: [
2990
+ /* @__PURE__ */ jsx(
2991
+ "div",
2992
+ {
2993
+ style: {
2994
+ display: "flex",
2995
+ alignItems: "center",
2996
+ gap: "8px"
2997
+ },
2998
+ children: /* @__PURE__ */ jsx(
2999
+ "span",
3000
+ {
3001
+ style: {
3002
+ fontFamily: theme2.fonts.body,
3003
+ fontSize: theme2.fontSizes[1],
3004
+ fontWeight: 500,
3005
+ color: theme2.colors.text,
3006
+ overflow: "hidden",
3007
+ textOverflow: "ellipsis",
3008
+ whiteSpace: "nowrap"
3009
+ },
3010
+ children: layer.name
3011
+ }
3012
+ )
3013
+ }
3014
+ ),
3015
+ /* @__PURE__ */ jsxs(
3016
+ "div",
3017
+ {
3018
+ style: {
3019
+ display: "flex",
3020
+ alignItems: "center",
3021
+ gap: "12px",
3022
+ fontFamily: theme2.fonts.body,
3023
+ fontSize: theme2.fontSizes[0],
3024
+ color: theme2.colors.textSecondary
3025
+ },
3026
+ children: [
3027
+ /* @__PURE__ */ jsxs("span", { children: [
3028
+ fileCount,
3029
+ " ",
3030
+ fileCount === 1 ? "file" : "files"
3031
+ ] }),
3032
+ layer.timestamp && /* @__PURE__ */ jsx("span", { children: formatTimestamp(layer.timestamp) })
3033
+ ]
3034
+ }
3035
+ )
3036
+ ]
3037
+ }
3038
+ ),
3039
+ /* @__PURE__ */ jsx(
3040
+ "button",
3041
+ {
3042
+ onClick: (e) => {
3043
+ e.stopPropagation();
3044
+ onLayerClick == null ? void 0 : onLayerClick(layer.id);
3045
+ },
3046
+ style: {
3047
+ display: "flex",
3048
+ alignItems: "center",
3049
+ justifyContent: "center",
3050
+ width: "32px",
3051
+ height: "32px",
3052
+ padding: 0,
3053
+ backgroundColor: "transparent",
3054
+ border: `1px solid ${theme2.colors.border}`,
3055
+ borderRadius: "4px",
3056
+ cursor: onLayerClick ? "pointer" : "default",
3057
+ color: layer.enabled ? theme2.colors.primary : theme2.colors.textSecondary,
3058
+ flexShrink: 0,
3059
+ transition: "all 0.15s ease"
3060
+ },
3061
+ title: layer.enabled ? "Hide layer" : "Show layer",
3062
+ children: layer.enabled ? /* @__PURE__ */ jsx(Eye, { size: 16 }) : /* @__PURE__ */ jsx(EyeOff, { size: 16 })
3063
+ }
3064
+ )
3065
+ ]
3066
+ }
3067
+ ),
3068
+ isExpanded && /* @__PURE__ */ jsx(
3069
+ "div",
3070
+ {
3071
+ style: {
3072
+ backgroundColor: theme2.colors.backgroundLight,
3073
+ borderTop: `1px solid ${theme2.colors.border}`
3074
+ },
3075
+ children: layer.items.map((item, itemIndex) => /* @__PURE__ */ jsxs(
3076
+ "div",
3077
+ {
3078
+ style: {
3079
+ display: "flex",
3080
+ alignItems: "center",
3081
+ gap: "8px",
3082
+ padding: "8px 16px 8px 48px",
3083
+ borderBottom: itemIndex < layer.items.length - 1 ? `1px solid ${theme2.colors.border}40` : "none"
3084
+ },
3085
+ children: [
3086
+ /* @__PURE__ */ jsx(
3087
+ FileText,
3088
+ {
3089
+ size: 14,
3090
+ style: {
3091
+ color: layer.color,
3092
+ flexShrink: 0
3093
+ }
3094
+ }
3095
+ ),
3096
+ /* @__PURE__ */ jsxs(
3097
+ "div",
3098
+ {
3099
+ style: {
3100
+ display: "flex",
3101
+ flexDirection: "column",
3102
+ gap: "1px",
3103
+ minWidth: 0,
3104
+ flex: 1
3105
+ },
3106
+ children: [
3107
+ /* @__PURE__ */ jsx(
3108
+ "span",
3109
+ {
3110
+ style: {
3111
+ fontFamily: theme2.fonts.body,
3112
+ fontSize: theme2.fontSizes[0],
3113
+ color: theme2.colors.text,
3114
+ overflow: "hidden",
3115
+ textOverflow: "ellipsis",
3116
+ whiteSpace: "nowrap"
3117
+ },
3118
+ children: getFileName(item.path)
3119
+ }
3120
+ ),
3121
+ getDirectory(item.path) && /* @__PURE__ */ jsx(
3122
+ "span",
3123
+ {
3124
+ style: {
3125
+ fontFamily: theme2.fonts.body,
3126
+ fontSize: "10px",
3127
+ color: theme2.colors.textSecondary,
3128
+ overflow: "hidden",
3129
+ textOverflow: "ellipsis",
3130
+ whiteSpace: "nowrap"
3131
+ },
3132
+ children: getDirectory(item.path)
3133
+ }
3134
+ )
3135
+ ]
3136
+ }
3137
+ ),
3138
+ /* @__PURE__ */ jsx(
3139
+ "span",
3140
+ {
3141
+ style: {
3142
+ fontFamily: theme2.fonts.body,
3143
+ fontSize: "10px",
3144
+ color: theme2.colors.textSecondary,
3145
+ backgroundColor: `${layer.color}20`,
3146
+ padding: "2px 6px",
3147
+ borderRadius: "3px",
3148
+ textTransform: "uppercase",
3149
+ flexShrink: 0
3150
+ },
3151
+ children: item.renderStrategy
3152
+ }
3153
+ )
3154
+ ]
3155
+ },
3156
+ item.path
3157
+ ))
3158
+ }
3159
+ )
3160
+ ]
3161
+ },
3162
+ layer.id
3163
+ );
3164
+ })
3165
+ }
3166
+ )
3167
+ ]
3168
+ }
3169
+ );
3170
+ };
3171
+ const LegendTabs = ({
3172
+ tabs,
3173
+ defaultTab,
3174
+ onTabChange
3175
+ }) => {
3176
+ var _a;
3177
+ const { theme: theme2 } = useTheme();
3178
+ const [activeTab, setActiveTab] = React.useState(
3179
+ defaultTab || ((_a = tabs[0]) == null ? void 0 : _a.id) || "agent"
3180
+ );
3181
+ React.useEffect(() => {
3182
+ if (tabs.length > 0 && !tabs.find((t) => t.id === activeTab)) {
3183
+ setActiveTab(tabs[0].id);
3184
+ }
3185
+ }, [tabs, activeTab]);
3186
+ const handleTabClick = (tabId) => {
3187
+ setActiveTab(tabId);
3188
+ onTabChange == null ? void 0 : onTabChange(tabId);
3189
+ };
3190
+ if (tabs.length === 0) {
3191
+ return /* @__PURE__ */ jsx(
3192
+ "div",
3193
+ {
3194
+ style: {
3195
+ display: "flex",
3196
+ alignItems: "center",
3197
+ justifyContent: "center",
3198
+ flex: 1,
3199
+ padding: "24px 16px",
3200
+ color: theme2.colors.textSecondary,
3201
+ fontFamily: theme2.fonts.body,
3202
+ fontSize: theme2.fontSizes[0],
3203
+ fontStyle: "italic"
3204
+ },
3205
+ children: "No data available"
3206
+ }
3207
+ );
3208
+ }
3209
+ if (tabs.length === 1) {
3210
+ return /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 }, children: tabs[0].content });
3211
+ }
3212
+ const activeTabData = tabs.find((t) => t.id === activeTab);
3213
+ return /* @__PURE__ */ jsxs(
3214
+ "div",
3215
+ {
3216
+ style: {
3217
+ display: "flex",
3218
+ flexDirection: "column",
3219
+ flex: 1,
3220
+ minHeight: 0,
3221
+ overflow: "hidden"
3222
+ },
3223
+ children: [
3224
+ /* @__PURE__ */ jsx(
3225
+ "div",
3226
+ {
3227
+ style: {
3228
+ display: "flex",
3229
+ flexShrink: 0
3230
+ },
3231
+ children: tabs.map((tab, index) => {
3232
+ const isActive = tab.id === activeTab;
3233
+ return /* @__PURE__ */ jsxs(
3234
+ "button",
3235
+ {
3236
+ onClick: () => handleTabClick(tab.id),
3237
+ style: {
3238
+ display: "flex",
3239
+ alignItems: "center",
3240
+ justifyContent: "center",
3241
+ gap: "6px",
3242
+ flex: 1,
3243
+ padding: "10px 12px",
3244
+ backgroundColor: theme2.colors.background,
3245
+ border: `1px solid ${theme2.colors.border}`,
3246
+ borderBottom: isActive ? `1px solid ${theme2.colors.background}` : `1px solid ${theme2.colors.border}`,
3247
+ borderLeft: index === 0 ? `1px solid ${theme2.colors.border}` : "none",
3248
+ marginBottom: "-1px",
3249
+ cursor: "pointer",
3250
+ fontFamily: theme2.fonts.body,
3251
+ fontSize: theme2.fontSizes[0],
3252
+ fontWeight: isActive ? 600 : 400,
3253
+ color: isActive ? theme2.colors.text : theme2.colors.textSecondary,
3254
+ opacity: isActive ? 1 : 0.9,
3255
+ transition: "all 0.15s ease"
3256
+ },
3257
+ children: [
3258
+ /* @__PURE__ */ jsx(
3259
+ "span",
3260
+ {
3261
+ style: {
3262
+ display: "flex",
3263
+ alignItems: "center",
3264
+ color: isActive ? theme2.colors.primary : theme2.colors.textSecondary
3265
+ },
3266
+ children: tab.icon
3267
+ }
3268
+ ),
3269
+ /* @__PURE__ */ jsx("span", { children: tab.label }),
3270
+ tab.count !== void 0 && tab.count > 0 && /* @__PURE__ */ jsx(
3271
+ "span",
3272
+ {
3273
+ style: {
3274
+ backgroundColor: isActive ? theme2.colors.primary : theme2.colors.border,
3275
+ color: isActive ? theme2.colors.background : theme2.colors.textSecondary,
3276
+ padding: "1px 6px",
3277
+ borderRadius: "8px",
3278
+ fontSize: "10px",
3279
+ fontWeight: 500,
3280
+ minWidth: "18px",
3281
+ textAlign: "center"
3282
+ },
3283
+ children: tab.count
3284
+ }
3285
+ )
3286
+ ]
3287
+ },
3288
+ tab.id
3289
+ );
3290
+ })
3291
+ }
3292
+ ),
3293
+ /* @__PURE__ */ jsx(
3294
+ "div",
3295
+ {
3296
+ style: {
3297
+ display: "flex",
3298
+ flexDirection: "column",
3299
+ flex: 1,
3300
+ minHeight: 0,
3301
+ overflow: "auto",
3302
+ borderTop: `1px solid ${theme2.colors.border}`
3303
+ },
3304
+ children: activeTabData == null ? void 0 : activeTabData.content
3305
+ }
3306
+ )
3307
+ ]
3308
+ }
3309
+ );
3310
+ };
3311
+ const createAgentTab = (content, count2) => ({
3312
+ id: "agent",
3313
+ label: "Agent",
3314
+ icon: /* @__PURE__ */ jsx(Activity, { size: 14 }),
3315
+ count: count2,
3316
+ content
3317
+ });
3318
+ const createGitTab = (content, count2) => ({
3319
+ id: "git",
3320
+ label: "Git",
3321
+ icon: /* @__PURE__ */ jsx(GitBranch, { size: 14 }),
3322
+ count: count2,
3323
+ content
3324
+ });
2631
3325
  function getDefaultExportFromCjs(x) {
2632
3326
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2633
3327
  }
@@ -15254,6 +15948,24 @@ const CodeCityPanelContent = ({
15254
15948
  enabled: layer.enabled
15255
15949
  }));
15256
15950
  }, [highlightLayers]);
15951
+ const agentActivityLayers = useMemo(() => {
15952
+ const agentLayers = highlightLayers.filter(
15953
+ (layer) => layer.id.startsWith("event-highlight")
15954
+ );
15955
+ return agentLayers.map((layer) => ({
15956
+ id: layer.id,
15957
+ name: layer.name,
15958
+ color: layer.color,
15959
+ enabled: layer.enabled,
15960
+ items: layer.items.map((item) => ({
15961
+ path: item.path,
15962
+ type: item.type,
15963
+ renderStrategy: item.renderStrategy || "fill"
15964
+ })),
15965
+ timestamp: layer.timestamp
15966
+ }));
15967
+ }, [highlightLayers]);
15968
+ const hasAgentActivity = agentActivityLayers.length > 0;
15257
15969
  const legendQualityMetrics = useMemo(() => {
15258
15970
  const qualityModeIds = ["coverage", "eslint", "typescript", "prettier", "knip", "alexandria"];
15259
15971
  if (!qualityModeIds.includes(colorMode)) {
@@ -15787,7 +16499,40 @@ const CodeCityPanelContent = ({
15787
16499
  ]
15788
16500
  }
15789
16501
  ),
15790
- /* @__PURE__ */ jsx(
16502
+ hasAgentActivity ? /* @__PURE__ */ jsx(
16503
+ LegendTabs,
16504
+ {
16505
+ tabs: [
16506
+ createAgentTab(
16507
+ /* @__PURE__ */ jsx(
16508
+ AgentActivityView,
16509
+ {
16510
+ layers: agentActivityLayers,
16511
+ onLayerClick: toggleAgentLayer,
16512
+ onClearAll: clearAgentLayers,
16513
+ showHeader: false
16514
+ }
16515
+ ),
16516
+ agentActivityLayers.length
16517
+ ),
16518
+ ...legendGitStatus.length > 0 ? [
16519
+ createGitTab(
16520
+ /* @__PURE__ */ jsx(
16521
+ Legend,
16522
+ {
16523
+ fileTypes: [],
16524
+ gitStatus: legendGitStatus,
16525
+ onGitStatusClick: toggleGitStatus,
16526
+ position: layout.legendPosition
16527
+ }
16528
+ ),
16529
+ legendGitStatus.reduce((sum, s) => sum + s.count, 0)
16530
+ )
16531
+ ] : []
16532
+ ],
16533
+ defaultTab: "agent"
16534
+ }
16535
+ ) : /* @__PURE__ */ jsx(
15791
16536
  Legend,
15792
16537
  {
15793
16538
  fileTypes: legendFileTypes,