@memberjunction/ng-dashboards 5.40.2 → 5.42.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/AI/components/analytics/ai-analytics-resource.component.d.ts +38 -4
- package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/ai-analytics-resource.component.js +148 -20
- package/dist/AI/components/analytics/ai-analytics-resource.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management-data.d.ts +216 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.js +313 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts +103 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.js +1060 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +87 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js +710 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +127 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.js +233 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.d.ts +94 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.js +728 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +2 -2
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +2 -2
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +2 -2
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/index.d.ts +5 -0
- package/dist/AI/index.d.ts.map +1 -1
- package/dist/AI/index.js +7 -0
- package/dist/AI/index.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +2 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/Home/home-dashboard.component.js +12 -8
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.d.ts +12 -0
- package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +419 -333
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +5 -5
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.d.ts +16 -2
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +37 -5
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +22 -19
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +18 -0
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +1 -1
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +3 -1
- package/dist/core-dashboards.module.js.map +1 -1
- package/package.json +55 -55
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-sessions.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/analytics/realtime/realtime-sessions.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH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AK,CAAC;YAC7D,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;IAEO,WAAW;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;qTAnQQ,kCAAkC,yBAAlC,kCAAkC;6DAAlC,kCAAkC;YAzZrC,AAJF,oGAAiB,sEAIR;;YAJT,uCA8IC;;;iFA+QI,kCAAkC;cAja9C,SAAS;6BACM,KAAK,YACP,iCAAiC,YACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgJT;;kBAgRA,KAAK;;kFAFG,kCAAkC;AAsQ/C,MAAM,UAAU,6BAA6B,KAAmC,CAAC","sourcesContent":["/**\n * @fileoverview Realtime Voice — sessions management grid.\n *\n * Every long-lived `MJ: AI Agent Sessions` row across the platform — live\n * calls, idle holds, and closed history — with the channels each session\n * opened and the agent runs it delegated. KPI strip up top, a filter bar\n * (search · status · target agent · user · host), the data grid (Agent →\n * Target, status pills incl. the persisted close cause — explicit / janitor /\n * shutdown / error / unknown-legacy, channel icons, run count, tokens / cost,\n * started, duration, host instance), and row drill-in to the session record.\n */\n\nimport {\n Component, Input, OnInit, ChangeDetectorRef, inject\n} from '@angular/core';\nimport { CompositeKey } from '@memberjunction/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { SharedService } from '@memberjunction/ng-shared';\nimport { KPICardData } from '../../widgets/kpi-card.component';\nimport {\n RealtimeSessionRollup, RealtimeSessionsDataset,\n LoadRealtimeSessionsDataset, FormatSessionDuration, FormatTokenCount,\n FormatSessionCost, FormatSessionStart, ChannelIconClass,\n BuildSessionStatusDisplay\n} from './realtime-session-data';\n\n// ── View models ──\n\ninterface SessionGridRow {\n ID: string;\n Agent: string;\n Target: string;\n User: string;\n Status: string;\n StatusLabel: string;\n StatusClass: string;\n StatusTitle: string;\n /** Pill icon (close cause for Closed rows); empty for Active, which renders the live dot. */\n StatusIcon: string;\n IsResumed: boolean;\n ChannelIcons: { Icon: string; Name: string }[];\n ChannelCount: number;\n Runs: number;\n Tokens: string;\n Cost: string;\n Started: string;\n StartedAt: Date;\n Duration: string;\n Host: string;\n SearchText: string;\n}\n\ninterface SelectOption {\n Value: string;\n Label: string;\n}\n\nconst PAGE_SIZE = 25;\n\n@Component({\n standalone: false,\n selector: 'app-analytics-realtime-sessions',\n template: `\n @if (IsLoading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading agent sessions...\"></mj-loading>\n </div>\n } @else {\n <!-- KPI strip -->\n <div class=\"kpi-grid\">\n @for (kpi of KPICards; track kpi.title) {\n <app-kpi-card [data]=\"kpi\"></app-kpi-card>\n }\n </div>\n\n <!-- Filter bar: search · status · target agent · user · host -->\n <div class=\"filterbar\">\n <div class=\"search-input\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n <input type=\"text\"\n placeholder=\"Search sessions, users, hosts…\"\n [value]=\"SearchTerm\"\n (input)=\"OnSearchChanged($event)\" />\n </div>\n <select class=\"filter-select\" [value]=\"StatusFilter\" (change)=\"OnStatusFilterChanged($event)\">\n <option value=\"\">Status: All</option>\n <option value=\"Active\">Active</option>\n <option value=\"Idle\">Idle</option>\n <option value=\"Closed\">Closed</option>\n </select>\n <select class=\"filter-select\" [value]=\"TargetFilter\" (change)=\"OnTargetFilterChanged($event)\">\n <option value=\"\">Target: All</option>\n @for (opt of TargetOptions; track opt.Value) {\n <option [value]=\"opt.Value\">{{ opt.Label }}</option>\n }\n </select>\n <select class=\"filter-select\" [value]=\"UserFilter\" (change)=\"OnUserFilterChanged($event)\">\n <option value=\"\">User: All</option>\n @for (opt of UserOptions; track opt.Value) {\n <option [value]=\"opt.Value\">{{ opt.Label }}</option>\n }\n </select>\n <select class=\"filter-select\" [value]=\"HostFilter\" (change)=\"OnHostFilterChanged($event)\">\n <option value=\"\">Host: All</option>\n @for (opt of HostOptions; track opt.Value) {\n <option [value]=\"opt.Value\">{{ opt.Label }}</option>\n }\n </select>\n <span class=\"result-pill\">{{ FilteredRows.length }} results · {{ LiveCount }} live</span>\n <button mjButton variant=\"secondary\" size=\"sm\" title=\"Refresh\" (click)=\"LoadData()\">\n <i class=\"fa-solid fa-rotate\"></i>\n </button>\n </div>\n\n <!-- Sessions grid -->\n <div class=\"panel\">\n <div class=\"table-wrapper\">\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Agent / Target</th>\n <th>User</th>\n <th>Status</th>\n <th>Channels</th>\n <th class=\"th-numeric\">Runs</th>\n <th class=\"th-numeric\">Tokens</th>\n <th class=\"th-numeric\">Cost</th>\n <th>Started</th>\n <th class=\"th-numeric\">Duration</th>\n <th>Host instance</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n @if (PagedRows.length === 0) {\n <tr><td colspan=\"11\" class=\"empty-row\">No sessions match the current filters</td></tr>\n }\n @for (row of PagedRows; track row.ID) {\n <tr class=\"session-row\" (click)=\"OpenSession(row.ID)\">\n <td>\n <div class=\"cell-strong\">{{ row.Agent }}</div>\n <div class=\"cell-sub\">\n <i class=\"fa-solid fa-arrow-right-long\"></i> {{ row.Target }}\n @if (row.IsResumed) {\n <span class=\"resumed-pill\" title=\"Resumed from a prior session\">\n <i class=\"fa-solid fa-link\"></i> resumed\n </span>\n }\n </div>\n </td>\n <td class=\"cell-user\">{{ row.User }}</td>\n <td>\n <span class=\"status-pill\" [class]=\"row.StatusClass\" [title]=\"row.StatusTitle\">\n @if (row.Status === 'Active') { <span class=\"dot dot--live\"></span> }\n @else if (row.StatusIcon) { <i [class]=\"row.StatusIcon\"></i> }\n {{ row.StatusLabel }}\n </span>\n </td>\n <td>\n <span class=\"chan-icons\">\n @for (chan of row.ChannelIcons; track chan.Name) {\n <i [class]=\"chan.Icon\" [title]=\"chan.Name\"></i>\n }\n </span>\n @if (row.ChannelCount > 0) {\n <span class=\"chan-count\">{{ row.ChannelCount }}</span>\n }\n </td>\n <td class=\"cell-numeric\">{{ row.Runs }}</td>\n <td class=\"cell-numeric mono\">{{ row.Tokens }}</td>\n <td class=\"cell-numeric mono\">{{ row.Cost }}</td>\n <td class=\"cell-time\">{{ row.Started }}</td>\n <td class=\"cell-numeric mono\">{{ row.Duration }}</td>\n <td class=\"cell-host mono\" [title]=\"row.Host\">{{ row.Host }}</td>\n <td class=\"cell-action\">\n <button mjButton variant=\"icon\" size=\"sm\" title=\"Open session record\"\n (click)=\"OpenSession(row.ID); $event.stopPropagation()\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <!-- Pagination / summary -->\n <div class=\"grid-footer\">\n <span class=\"grid-summary\">\n Showing {{ PagedRows.length }} of {{ FilteredRows.length }}\n · {{ LiveCount }} live · {{ IdleCount }} idle · {{ ClosedCount }} closed\n </span>\n @if (PageCount > 1) {\n <div class=\"pager\">\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"PageIndex === 0\" (click)=\"PrevPage()\">\n <i class=\"fa-solid fa-chevron-left\"></i>\n </button>\n <span class=\"pager-label\">Page {{ PageIndex + 1 }} of {{ PageCount }}</span>\n <button mjButton variant=\"secondary\" size=\"sm\" [disabled]=\"PageIndex >= PageCount - 1\" (click)=\"NextPage()\">\n <i class=\"fa-solid fa-chevron-right\"></i>\n </button>\n </div>\n }\n </div>\n }\n `,\n styles: [`\n :host { display: block; }\n\n .loading-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 300px;\n }\n\n /* ── KPI Grid ── */\n .kpi-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 12px;\n margin-bottom: 16px;\n }\n\n /* ── Filter bar ── */\n .filterbar {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n padding: 10px 14px;\n margin-bottom: 16px;\n }\n\n .search-input {\n display: flex;\n align-items: center;\n gap: 8px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 8px;\n padding: 6px 10px;\n min-width: 240px;\n flex: 1;\n max-width: 360px;\n }\n\n .search-input i {\n color: var(--mj-text-muted);\n font-size: 12px;\n }\n\n .search-input input {\n border: none;\n outline: none;\n background: transparent;\n color: var(--mj-text-primary);\n font-size: 13px;\n width: 100%;\n }\n\n .search-input input::placeholder { color: var(--mj-text-disabled); }\n\n .filter-select {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n color: var(--mj-text-secondary);\n font-size: 12.5px;\n padding: 6px 8px;\n max-width: 200px;\n }\n\n .result-pill {\n margin-left: auto;\n font-size: 12px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 12px;\n padding: 4px 12px;\n white-space: nowrap;\n }\n\n /* ── Panel + table (matches sibling analytics sections) ── */\n .panel {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: 12px;\n overflow: hidden;\n }\n\n .table-wrapper { overflow-x: auto; }\n\n .data-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n }\n\n .data-table th,\n .data-table td {\n padding: 10px 14px;\n text-align: left;\n border-bottom: 1px solid var(--mj-border-subtle);\n }\n\n .data-table th {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.4px;\n background: var(--mj-bg-surface-card);\n white-space: nowrap;\n }\n\n .th-numeric { text-align: right; }\n\n .session-row { cursor: pointer; transition: background 0.15s; }\n .session-row:hover { background: var(--mj-bg-surface-hover); }\n\n .cell-strong {\n font-weight: 600;\n color: var(--mj-text-primary);\n white-space: nowrap;\n }\n\n .cell-sub {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n display: flex;\n align-items: center;\n gap: 6px;\n white-space: nowrap;\n }\n\n .cell-user {\n max-width: 200px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-secondary);\n }\n\n .cell-numeric {\n text-align: right;\n font-variant-numeric: tabular-nums;\n color: var(--mj-text-secondary);\n }\n\n .cell-time {\n white-space: nowrap;\n color: var(--mj-text-muted);\n font-size: 12px;\n }\n\n .cell-host {\n max-width: 160px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-muted);\n }\n\n .cell-action { text-align: right; white-space: nowrap; }\n\n .mono {\n font-family: var(--mj-font-mono, monospace);\n font-size: 12px;\n }\n\n .empty-row {\n text-align: center;\n color: var(--mj-text-disabled);\n padding: 24px;\n }\n\n /* ── Status pills ── */\n .status-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.3px;\n white-space: nowrap;\n }\n\n .status-active {\n background: color-mix(in srgb, var(--mj-status-success) 12%, var(--mj-bg-surface));\n color: var(--mj-status-success);\n }\n\n .status-idle {\n background: color-mix(in srgb, var(--mj-status-warning) 12%, var(--mj-bg-surface));\n color: var(--mj-status-warning);\n }\n\n .status-closed {\n background: color-mix(in srgb, var(--mj-text-disabled) 12%, var(--mj-bg-surface));\n color: var(--mj-text-muted);\n }\n\n .dot--live {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: var(--mj-status-success);\n animation: pulse-live 1.6s ease-in-out infinite;\n }\n\n @keyframes pulse-live {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.35; }\n }\n\n .resumed-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 600;\n padding: 1px 7px;\n border-radius: 10px;\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n }\n\n .chan-icons {\n display: inline-flex;\n gap: 8px;\n color: var(--mj-text-secondary);\n font-size: 13px;\n }\n\n .chan-count {\n margin-left: 6px;\n font-size: 11px;\n color: var(--mj-text-muted);\n }\n\n /* ── Footer / pager ── */\n .grid-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n margin-top: 14px;\n flex-wrap: wrap;\n }\n\n .grid-summary {\n font-size: 12.5px;\n color: var(--mj-text-muted);\n }\n\n .pager {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .pager-label {\n font-size: 12.5px;\n color: var(--mj-text-secondary);\n white-space: nowrap;\n }\n `]\n})\nexport class AnalyticsRealtimeSessionsComponent extends BaseAngularComponent implements OnInit {\n private _timeRange = '7d';\n @Input()\n set TimeRange(value: string) {\n const prev = this._timeRange;\n this._timeRange = value;\n if (prev !== value && this.initialized) this.LoadData();\n }\n get TimeRange(): string { return this._timeRange; }\n\n private initialized = false;\n private cdr = inject(ChangeDetectorRef);\n private dataset: RealtimeSessionsDataset | null = null;\n private allRows: SessionGridRow[] = [];\n\n public IsLoading = false;\n public KPICards: KPICardData[] = [];\n public FilteredRows: SessionGridRow[] = [];\n public PagedRows: SessionGridRow[] = [];\n public TargetOptions: SelectOption[] = [];\n public UserOptions: SelectOption[] = [];\n public HostOptions: SelectOption[] = [];\n\n public SearchTerm = '';\n public StatusFilter = '';\n public TargetFilter = '';\n public UserFilter = '';\n public HostFilter = '';\n public PageIndex = 0;\n\n public get LiveCount(): number {\n return this.FilteredRows.filter(r => r.Status === 'Active').length;\n }\n\n public get IdleCount(): number {\n return this.FilteredRows.filter(r => r.Status === 'Idle').length;\n }\n\n public get ClosedCount(): number {\n return this.FilteredRows.filter(r => r.Status === 'Closed').length;\n }\n\n public get PageCount(): number {\n return Math.max(1, Math.ceil(this.FilteredRows.length / PAGE_SIZE));\n }\n\n ngOnInit(): void {\n this.initialized = true;\n this.LoadData();\n }\n\n // ── Data loading ──\n\n /** Reloads everything for the current time range. */\n public async LoadData(): Promise<void> {\n this.IsLoading = true;\n this.cdr.detectChanges();\n try {\n this.dataset = await LoadRealtimeSessionsDataset(this.ProviderToUse, this.TimeRange);\n this.buildRows();\n this.buildKPICards();\n this.buildFilterOptions();\n this.applyFilters();\n } catch (e) {\n console.error('Realtime sessions load error:', e);\n } finally {\n this.IsLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n // ── Drill-in ──\n\n /** Opens the AIAgentSession record via the shared Explorer record-open path. */\n public OpenSession(sessionId: string): void {\n const key = new CompositeKey();\n key.LoadFromSingleKeyValuePair('ID', sessionId);\n SharedService.Instance.OpenEntityRecord('MJ: AI Agent Sessions', key);\n }\n\n // ── Filter handlers ──\n\n public OnSearchChanged(event: Event): void {\n this.SearchTerm = (event.target as HTMLInputElement).value;\n this.applyFilters();\n }\n\n public OnStatusFilterChanged(event: Event): void {\n this.StatusFilter = (event.target as HTMLSelectElement).value;\n this.applyFilters();\n }\n\n public OnTargetFilterChanged(event: Event): void {\n this.TargetFilter = (event.target as HTMLSelectElement).value;\n this.applyFilters();\n }\n\n public OnUserFilterChanged(event: Event): void {\n this.UserFilter = (event.target as HTMLSelectElement).value;\n this.applyFilters();\n }\n\n public OnHostFilterChanged(event: Event): void {\n this.HostFilter = (event.target as HTMLSelectElement).value;\n this.applyFilters();\n }\n\n public PrevPage(): void {\n if (this.PageIndex > 0) {\n this.PageIndex--;\n this.applyPaging();\n }\n }\n\n public NextPage(): void {\n if (this.PageIndex < this.PageCount - 1) {\n this.PageIndex++;\n this.applyPaging();\n }\n }\n\n // ── Builders ──\n\n private buildRows(): void {\n const sessions = this.dataset?.Sessions ?? [];\n this.allRows = [...sessions]\n .sort((a, b) => b.StartedAt.getTime() - a.StartedAt.getTime())\n .map(s => this.toGridRow(s));\n }\n\n private toGridRow(s: RealtimeSessionRollup): SessionGridRow {\n const target = s.TargetAgentName ?? (s.TargetAgentID ? 'Unknown agent' : '—');\n const host = s.Record.HostInstanceID ?? '—';\n const user = s.Record.User;\n const agent = s.Record.Agent ?? 'Unknown';\n const statusDisplay = BuildSessionStatusDisplay(s.Record.Status, s.CloseReason);\n return {\n ID: s.Record.ID,\n Agent: agent,\n Target: target,\n User: user,\n Status: s.Record.Status,\n StatusLabel: statusDisplay.Label,\n StatusClass: 'status-pill status-' + s.Record.Status.toLowerCase(),\n StatusTitle: statusDisplay.Title,\n StatusIcon: statusDisplay.Icon,\n IsResumed: s.IsResumed,\n ChannelIcons: s.ChannelNames.map(name => ({ Icon: ChannelIconClass(name), Name: name })),\n ChannelCount: s.ChannelNames.length,\n Runs: s.DelegatedRunCount,\n Tokens: FormatTokenCount(s.TotalTokens),\n Cost: FormatSessionCost(s.TotalCost),\n Started: FormatSessionStart(s.StartedAt),\n StartedAt: s.StartedAt,\n Duration: FormatSessionDuration(s.DurationMs),\n Host: host,\n SearchText: [agent, target, user, host, s.Record.ID, s.Record.ConversationID ?? '']\n .join(' ').toLowerCase()\n };\n }\n\n private buildKPICards(): void {\n const sessions = this.dataset?.Sessions ?? [];\n const all = this.dataset?.AllSessions ?? [];\n\n const activeCount = sessions.filter(s => s.Record.Status === 'Active').length;\n const idleCount = sessions.filter(s => s.Record.Status === 'Idle').length;\n\n const now = new Date();\n const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const startOfYesterday = new Date(startOfToday.getTime() - 86_400_000);\n const todaySessions = all.filter(s => s.StartedAt >= startOfToday);\n const yesterdaySessions = all.filter(s => s.StartedAt >= startOfYesterday && s.StartedAt < startOfToday);\n const todayCost = todaySessions.reduce((a, s) => a + s.TotalCost, 0);\n\n const delegatedTotal = sessions.reduce((a, s) => a + s.DelegatedRunCount, 0);\n\n const trendPct = yesterdaySessions.length > 0\n ? Math.round(((todaySessions.length - yesterdaySessions.length) / yesterdaySessions.length) * 100)\n : 0;\n\n this.KPICards = [\n {\n title: 'Active now',\n value: activeCount,\n subtitle: 'live duplex sessions',\n icon: 'fa-tower-broadcast',\n color: 'success'\n },\n {\n title: 'Idle (holding)',\n value: idleCount,\n subtitle: 'past idle threshold',\n icon: 'fa-pause',\n color: 'warning'\n },\n {\n title: 'Sessions today',\n value: todaySessions.length,\n icon: 'fa-clock',\n color: 'primary',\n trend: yesterdaySessions.length > 0 ? {\n direction: trendPct > 0 ? 'up' : trendPct < 0 ? 'down' : 'stable',\n percentage: Math.abs(trendPct),\n period: 'vs yesterday'\n } : undefined,\n subtitle: yesterdaySessions.length > 0 ? undefined : 'no sessions yesterday'\n },\n {\n title: `Delegated runs (${this.TimeRange})`,\n value: delegatedTotal,\n subtitle: 'agent runs via AgentSessionID',\n icon: 'fa-diagram-project',\n color: 'info'\n },\n {\n title: 'Cost today',\n value: FormatSessionCost(todayCost),\n subtitle: 'co-agent + delegated',\n icon: 'fa-coins',\n color: 'danger'\n }\n ];\n }\n\n private buildFilterOptions(): void {\n const targets = new Map<string, string>();\n const users = new Map<string, string>();\n const hosts = new Set<string>();\n for (const row of this.allRows) {\n if (row.Target && row.Target !== '—') targets.set(row.Target, row.Target);\n if (row.User) users.set(row.User, row.User);\n if (row.Host && row.Host !== '—') hosts.add(row.Host);\n }\n const toOptions = (values: Iterable<string>) =>\n Array.from(values).sort((a, b) => a.localeCompare(b)).map(v => ({ Value: v, Label: v }));\n this.TargetOptions = toOptions(targets.keys());\n this.UserOptions = toOptions(users.keys());\n this.HostOptions = toOptions(hosts);\n }\n\n private applyFilters(): void {\n const search = this.SearchTerm.trim().toLowerCase();\n this.FilteredRows = this.allRows.filter(row => {\n if (this.StatusFilter && row.Status !== this.StatusFilter) return false;\n if (this.TargetFilter && row.Target !== this.TargetFilter) return false;\n if (this.UserFilter && row.User !== this.UserFilter) return false;\n if (this.HostFilter && row.Host !== this.HostFilter) return false;\n if (search && !row.SearchText.includes(search)) return false;\n return true;\n });\n this.PageIndex = 0;\n this.applyPaging();\n }\n\n private applyPaging(): void {\n const start = this.PageIndex * PAGE_SIZE;\n this.PagedRows = this.FilteredRows.slice(start, start + PAGE_SIZE);\n this.cdr.detectChanges();\n }\n}\n\nexport function LoadAnalyticsRealtimeSessions() { /* tree-shaking prevention */ }\n"]}
|
|
@@ -1107,7 +1107,7 @@ export class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
1107
1107
|
async findAutotagActionID() {
|
|
1108
1108
|
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
1109
1109
|
const result = await rv.RunView({
|
|
1110
|
-
EntityName: 'Actions',
|
|
1110
|
+
EntityName: 'MJ: Actions',
|
|
1111
1111
|
ExtraFilter: `Name = 'Autotag and Vectorize Content'`,
|
|
1112
1112
|
Fields: ['ID'],
|
|
1113
1113
|
ResultType: 'simple',
|
|
@@ -1125,7 +1125,7 @@ export class ClassifySourcesTabComponent extends BaseAngularComponent {
|
|
|
1125
1125
|
async createSourceIDParam(scheduledActionID, actionID, sourceID) {
|
|
1126
1126
|
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
1127
1127
|
const paramResult = await rv.RunView({
|
|
1128
|
-
EntityName: 'Action Params',
|
|
1128
|
+
EntityName: 'MJ: Action Params',
|
|
1129
1129
|
ExtraFilter: `ActionID = '${actionID}' AND Name = 'EntityNames'`,
|
|
1130
1130
|
Fields: ['ID', 'Name'],
|
|
1131
1131
|
ResultType: 'simple',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources-tab.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/sources-tab.component.ts","../../../../../src/AI/components/autotagging/tabs/sources-tab.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EA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AAmB;YACnG,AADmG,iBAAO,EACjG;YACT,iCAAqE;YAAxB,wGAAS,iBAAa,IAAC;YAClE,wBAAgC;YAAC,gCAA8B;YAAA,2BAAU;YAG/E,AADE,AADE,AAD2E,iBAAO,EACzE,EACL,EACkB;YAGxB,AADF,iDAAuD,cAC3B;YACxB,gGAAiB;YAKjB,gCAA0B;YACxB,iGAA8C;YAgB9C,gCAA6B;YAC3B,mGAmDC;YAGD,gCAAwD;YAAxB,sGAAS,iBAAa,IAAC;YACrD,yBAAuC;YACvC,iCAAoD;YAAA,mCAAkB;YAAA,iBAAO;YAC7E,iCAAkC;YAAA,4CAA2B;YAKvE,AADE,AADE,AADE,AADE,AAD+D,iBAAO,EAChE,EACF,EACF,EACF,EACgB;YAGxB,sFAAwB;YAuKxB,iGAAkD;YAwDlD,qDAIkC;YAAhC,6HAAU,wBAAoB,IAAC;YACjC,iBAA2B;;YA9U4C,eAAsB;YAAtB,wCAAsB;YACvF,cAIC;YAJD,uCAIC;YAWgB,gBAAiB;YAAC,AAAlB,+BAAiB,cAAc;YAElD,eAIC;YAJD,yCAIC;YAEC,eAcC;YAdD,0EAcC;YAGC,eAmDC;YAnDD,8BAmDC;YAcT,eAoKC;YApKD,gDAoKC;YAGD,cAqDC;YArDD,8EAqDC;YAIC,cAAqB;YAErB,AADA,AADA,uCAAqB,+BACK,oCACK;;;iFD/SpB,2BAA2B;cANvC,SAAS;6BACM,KAAK,YACP,sBAAsB;;kBAW/B,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAyCL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFAvIE,2BAA2B","sourcesContent":["/**\n * @fileoverview Classify · Content Sources tab.\n *\n * Self-contained sub-page: owns its header-interior, the source cards grid,\n * the per-source detail slide-in, and the quick-schedule dialog. Receives the\n * shared raw data needed to build the cards (sources, items, tags, runs, and\n * the cached ScheduledAction + EntityRecordDocument lookups) from the host\n * orchestrator via `@Input()`. Cross-tab concerns — opening the add/edit slide-in\n * form, running the pipeline, opening a content-item detail, and reloading the\n * shared source list after a mutation — bubble up via `@Output()`.\n *\n * Out of scope (stays in the host): the add/edit source slide-in FORM, the\n * pipeline tab, and the Content Duplicates section.\n */\nimport { Component, ChangeDetectorRef, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { BaseEntity, CompositeKey, RunView } from '@memberjunction/core';\nimport { UUIDsEqual, NormalizeUUID } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { KnowledgeHubMetadataEngine, MJScheduledActionEntity, MJScheduledActionParamEntity, MJContentSourceEntity } from '@memberjunction/core-entities';\nimport {\n SourceCard, SourceDetailInfo, ContentItemDetail, RunHistoryRow, WeightedTag,\n ItemPipelineStatus\n} from '../shared/classify.types';\nimport { formatNumber, formatDate, computeDuration, displayStatus, getSourceTypeIcon, CronToHumanReadable, deriveDisplayName } from '../shared/classify.format';\n\n@Component({\n standalone: false,\n selector: 'classify-sources-tab',\n templateUrl: './sources-tab.component.html',\n styleUrls: ['./sources-tab.component.css']\n})\nexport class ClassifySourcesTabComponent extends BaseAngularComponent {\n private cdr = inject(ChangeDetectorRef);\n\n // ── Shared raw inputs (host is the data orchestrator) ──\n\n /** Raw `MJ: Content Sources` rows — the primary source for the cards. */\n private _sources: Record<string, unknown>[] = [];\n @Input()\n set Sources(value: Record<string, unknown>[]) {\n this._sources = value ?? [];\n this.rebuild();\n }\n get Sources(): Record<string, unknown>[] {\n return this._sources;\n }\n\n /** Raw `MJ: Content Items` rows — used to count items per source. */\n private _items: Record<string, unknown>[] = [];\n @Input()\n set Items(value: Record<string, unknown>[]) {\n this._items = value ?? [];\n this.rebuild();\n }\n get Items(): Record<string, unknown>[] {\n return this._items;\n }\n\n /** Raw `MJ: Content Item Tags` rows — used to count tags per source. */\n private _tags: Record<string, unknown>[] = [];\n @Input()\n set Tags(value: Record<string, unknown>[]) {\n this._tags = value ?? [];\n this.rebuild();\n }\n get Tags(): Record<string, unknown>[] {\n return this._tags;\n }\n\n /** Raw `MJ: Content Process Runs` rows — used to derive last-run + status. */\n private _runs: Record<string, unknown>[] = [];\n @Input()\n set Runs(value: Record<string, unknown>[]) {\n this._runs = value ?? [];\n this.rebuild();\n }\n get Runs(): Record<string, unknown>[] {\n return this._runs;\n }\n\n /** Accurate total item count from TotalRowCount (used when a single source exists). */\n private _totalItemCount = 0;\n @Input()\n set TotalItemCount(value: number) {\n this._totalItemCount = value ?? 0;\n this.rebuild();\n }\n get TotalItemCount(): number {\n return this._totalItemCount;\n }\n\n /** Accurate total tag count from TotalRowCount (used when a single source exists). */\n private _totalTagCount = 0;\n @Input()\n set TotalTagCount(value: number) {\n this._totalTagCount = value ?? 0;\n this.rebuild();\n }\n get TotalTagCount(): number {\n return this._totalTagCount;\n }\n\n /** Cached ScheduledAction entities, keyed by normalized ID, supplied by the host. */\n private _scheduledActions = new Map<string, MJScheduledActionEntity>();\n @Input()\n set ScheduledActions(value: Map<string, MJScheduledActionEntity>) {\n this._scheduledActions = value ?? new Map<string, MJScheduledActionEntity>();\n this.rebuild();\n }\n get ScheduledActions(): Map<string, MJScheduledActionEntity> {\n return this._scheduledActions;\n }\n\n /** Cache: EntityRecordDocument ID → RecordID, supplied by the host. */\n private _entityRecordDocCache = new Map<string, string>();\n @Input()\n set EntityRecordDocCache(value: Map<string, string>) {\n this._entityRecordDocCache = value ?? new Map<string, string>();\n }\n get EntityRecordDocCache(): Map<string, string> {\n return this._entityRecordDocCache;\n }\n\n // ── Tab-local view state ──\n\n /** Shown while a manual Refresh() recomputes the source cards. */\n public IsLoading = false;\n\n public SourceCards: SourceCard[] = [];\n\n // Source Detail slide-in\n public SelectedSource: SourceDetailInfo | null = null;\n public ShowSourceDetail = false;\n public SourceDetailLoading = false;\n public SourceDetailStatusFilter: ItemPipelineStatus | 'All' = 'All';\n public readonly SourceDetailStatusOptions: (ItemPipelineStatus | 'All')[] = ['All', 'Complete', 'Processing', 'Failed', 'Pending'];\n public SourceDetailPage = 0;\n public readonly SourceDetailPageSize = 10;\n\n // Dry-run preview dialog (hosted here, like the schedule + detail dialogs)\n public ShowDryRunPreview = false;\n public DryRunSourceCard: SourceCard | null = null;\n\n // Schedule dialog\n public ShowScheduleDialog = false;\n public ScheduleSaving = false;\n public SchedulingSourceCard: SourceCard | null = null;\n public ScheduleCron = '0 2 * * *';\n public ScheduleEnabled = true;\n\n /** Template-facing formatter. */\n public readonly formatNumber = formatNumber;\n\n // ── Cross-tab intents (host owns the slide-in form, navigation, pipeline) ──\n\n /** Bubble \"add source\" up — host opens its slide-in CRUD form. */\n @Output() AddSourceRequested = new EventEmitter<void>();\n /** Bubble \"add source (guided)\" up — host opens the setup wizard. */\n @Output() AddSourceGuidedRequested = new EventEmitter<void>();\n /** Bubble \"edit source\" up — host opens its slide-in CRUD form pre-filled. */\n @Output() EditSourceRequested = new EventEmitter<SourceCard>();\n /** Bubble \"run pipeline for source\" up — host runs the pipeline for the given source ID. */\n @Output() RunSourceRequested = new EventEmitter<string>();\n /** Bubble \"open content item detail\" up — host owns the item-detail slide-in. */\n @Output() OpenContentItemRequested = new EventEmitter<ContentItemDetail>();\n /** Fired after a delete / schedule change so the host reloads the shared source list. */\n @Output() DataChanged = new EventEmitter<void>();\n\n /**\n * Recompute the source cards from the current host-supplied inputs. The data\n * itself is owned by the host (flows in via @Input); Refresh just rebuilds the\n * view models and surfaces a brief loading state for user feedback.\n */\n public async Refresh(): Promise<void> {\n this.IsLoading = true;\n this.cdr.detectChanges();\n this.rebuild();\n this.IsLoading = false;\n this.cdr.detectChanges();\n }\n\n public onAddSource(): void {\n this.AddSourceRequested.emit();\n }\n\n public onAddSourceGuided(): void {\n this.AddSourceGuidedRequested.emit();\n }\n\n public onEditSource(card: SourceCard): void {\n this.EditSourceRequested.emit(card);\n }\n\n public onRunSource(sourceID: string): void {\n this.RunSourceRequested.emit(sourceID);\n }\n\n // ── Dry-run preview (in-memory, nothing persisted) ──\n\n /** Opens the dry-run disposition preview for a source. */\n public OpenDryRunPreview(card: SourceCard): void {\n this.DryRunSourceCard = card;\n this.ShowDryRunPreview = true;\n this.cdr.detectChanges();\n }\n\n public CloseDryRunPreview(): void {\n this.ShowDryRunPreview = false;\n this.DryRunSourceCard = null;\n this.cdr.detectChanges();\n }\n\n // ════════════════════════════════════════════\n // SOURCE CARDS\n // ════════════════════════════════════════════\n\n /** Rebuild the source card view models from the current inputs. */\n private rebuild(): void {\n const singleSource = this._sources.length === 1;\n const itemCountBySource = singleSource ? null : this.countItemsBySource();\n const tagCountBySource = singleSource ? null : this.countTagsBySource();\n const lastRunBySource = this.getLastRunBySource();\n\n this.SourceCards = this._sources.map(source => {\n const id = source['ID'] as string;\n const itemCount = singleSource ? this._totalItemCount : (itemCountBySource!.get(id) ?? 0);\n const tagCount = singleSource ? this._totalTagCount : (tagCountBySource!.get(id) ?? 0);\n const avgTags = itemCount > 0 ? (tagCount / itemCount).toFixed(1) : '0';\n const lastRun = lastRunBySource.get(id);\n const typeName = (source['ContentSourceType'] as string) ?? 'Unknown';\n const lastRunStatus = lastRun ? (lastRun['Status'] as string)?.toLowerCase() : null;\n const hasError = lastRunStatus === 'error' || lastRunStatus === 'failed';\n\n const scheduledActionID = (source['ScheduledActionID'] as string | null) ?? null;\n const scheduledActionName = (source['ScheduledAction'] as string | null) ?? null;\n const cronExpr = scheduledActionID ? this.getScheduledActionCron(scheduledActionID) : null;\n\n return {\n ID: id,\n Name: (source['Name'] as string) ?? 'Unnamed Source',\n SourceTypeName: typeName,\n ContentTypeName: (source['ContentType'] as string) ?? 'Unknown',\n FileTypeName: (source['ContentFileType'] as string) ?? 'Unknown',\n Icon: getSourceTypeIcon(typeName),\n StatusClass: hasError ? 'error' as const : 'active' as const,\n StatusLabel: hasError ? 'Error' : 'Active',\n URL: (source['URL'] as string) ?? '',\n ItemCount: itemCount,\n TagCount: tagCount,\n AvgTags: avgTags,\n LastRunAgo: lastRun ? this.formatRelativeTime(lastRun['StartTime'] as string) : 'Never',\n ContentSourceTypeID: source['ContentSourceTypeID'] as string,\n ContentTypeID: source['ContentTypeID'] as string,\n ContentFileTypeID: source['ContentFileTypeID'] as string,\n EmbeddingModelID: (source['EmbeddingModelID'] as string) ?? '',\n VectorIndexID: (source['VectorIndexID'] as string) ?? '',\n EntityID: (source['EntityID'] as string) ?? '',\n EntityDocumentID: (source['EntityDocumentID'] as string) ?? '',\n RequiresFileType: this.sourceTypeRequiresFileType(source['ContentSourceTypeID'] as string),\n ScheduledActionID: scheduledActionID,\n ScheduledActionName: scheduledActionName,\n ScheduleDescription: cronExpr ? CronToHumanReadable(cronExpr) : null,\n };\n });\n this.cdr.detectChanges();\n }\n\n // ── Aggregation utilities (read only the raw inputs) ──\n\n private countItemsBySource(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const item of this._items) {\n const sourceId = item['ContentSourceID'] as string;\n if (sourceId) counts.set(sourceId, (counts.get(sourceId) ?? 0) + 1);\n }\n return counts;\n }\n\n private countTagsBySource(): Map<string, number> {\n const itemSourceMap = new Map<string, string>();\n for (const item of this._items) {\n itemSourceMap.set(item['ID'] as string, item['ContentSourceID'] as string);\n }\n const counts = new Map<string, number>();\n for (const tag of this._tags) {\n const sourceId = itemSourceMap.get(tag['ItemID'] as string);\n if (sourceId) counts.set(sourceId, (counts.get(sourceId) ?? 0) + 1);\n }\n return counts;\n }\n\n private getLastRunBySource(): Map<string, Record<string, unknown>> {\n const map = new Map<string, Record<string, unknown>>();\n for (const run of this._runs) {\n const sourceId = run['SourceID'] as string;\n if (sourceId && !map.has(sourceId)) {\n map.set(sourceId, run);\n }\n }\n return map;\n }\n\n private countTagsByItem(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const tag of this._tags) {\n const itemId = NormalizeUUID(tag['ItemID'] as string);\n if (itemId) counts.set(itemId, (counts.get(itemId) ?? 0) + 1);\n }\n return counts;\n }\n\n private getAllWeightedTagsForItem(itemId: string): WeightedTag[] {\n const tags: WeightedTag[] = [];\n for (const tag of this._tags) {\n if (UUIDsEqual(tag['ItemID'] as string, itemId)) {\n tags.push({\n Tag: tag['Tag'] as string,\n Weight: Number(tag['Weight'] ?? 1),\n });\n }\n }\n return tags.sort((a, b) => b.Weight - a.Weight);\n }\n\n /** Check if a source type's Configuration says RequiresFileType !== false */\n private sourceTypeRequiresFileType(sourceTypeID: string): boolean {\n try {\n const engine = KnowledgeHubMetadataEngine.Instance;\n const st = engine.ContentSourceTypes.find(t => UUIDsEqual(t.ID, sourceTypeID));\n return st?.ConfigurationObject?.RequiresFileType !== false;\n } catch {\n return true;\n }\n }\n\n /** Resolve the entity record ID from the EntityRecordDocument for entity-sourced content items */\n private resolveEntityRecordID(item: Record<string, unknown>): string | null {\n const erdID = item['EntityRecordDocumentID'] as string | null;\n if (!erdID) return null;\n return this._entityRecordDocCache.get(NormalizeUUID(erdID)) ?? null;\n }\n\n /** Resolve the entity name for an entity-sourced content source */\n private resolveEntityName(sourceId: string): string | null {\n try {\n const engine = KnowledgeHubMetadataEngine.Instance;\n const source = engine.ContentSources.find(cs => UUIDsEqual(cs.ID, sourceId));\n if (!source?.EntityID) return null;\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(e => UUIDsEqual(e.ID, source.EntityID));\n return entityInfo?.Name ?? null;\n } catch {\n return null;\n }\n }\n\n private resolveEmbeddingModelName(modelId: string): string {\n if (!modelId) return 'System default';\n const aiEngine = AIEngineBase.Instance;\n const model = aiEngine.Models.find(m => UUIDsEqual(m.ID, modelId));\n return model ? model.Name : 'Unknown';\n }\n\n private resolveVectorIndexName(indexId: string): string {\n if (!indexId) return 'System default';\n const engine = KnowledgeHubMetadataEngine.Instance;\n const idx = engine.GetVectorIndexById(indexId);\n return idx ? idx.Name : 'Unknown';\n }\n\n /**\n * Infer embedding and tagging pipeline statuses for a content item. Uses tag\n * count + run-history heuristics since dedicated status columns are not yet\n * available on the ContentItem entity.\n */\n private inferPipelineStatuses(\n rawItem: Record<string, unknown>,\n tagCount: number\n ): { EmbeddingStatus: ItemPipelineStatus; TaggingStatus: ItemPipelineStatus } {\n const explicitEmbedding = rawItem['EmbeddingStatus'] as string | undefined;\n const explicitTagging = rawItem['TaggingStatus'] as string | undefined;\n if (explicitEmbedding || explicitTagging) {\n return {\n EmbeddingStatus: this.mapStatusString(explicitEmbedding),\n TaggingStatus: this.mapStatusString(explicitTagging),\n };\n }\n\n const hasChecksum = !!(rawItem['Checksum'] as string);\n const hasText = !!((rawItem['Text'] as string)?.trim());\n const sourceID = rawItem['ContentSourceID'] as string;\n const lastRun = this._runs.find(r => r['SourceID'] as string === sourceID);\n const lastRunFailed = lastRun &&\n ((lastRun['Status'] as string)?.toLowerCase() === 'error' ||\n (lastRun['Status'] as string)?.toLowerCase() === 'failed');\n\n let embeddingStatus: ItemPipelineStatus = 'Pending';\n if (hasChecksum || hasText) embeddingStatus = 'Complete';\n else if (lastRunFailed) embeddingStatus = 'Failed';\n\n let taggingStatus: ItemPipelineStatus = 'Pending';\n if (tagCount > 0) taggingStatus = 'Complete';\n else if (embeddingStatus === 'Complete') taggingStatus = lastRunFailed ? 'Failed' : 'Pending';\n else if (lastRunFailed) taggingStatus = 'Failed';\n\n return { EmbeddingStatus: embeddingStatus, TaggingStatus: taggingStatus };\n }\n\n private mapStatusString(status: string | undefined): ItemPipelineStatus {\n if (!status) return 'Pending';\n const lower = status.toLowerCase();\n if (lower === 'complete' || lower === 'completed' || lower === 'done') return 'Complete';\n if (lower === 'processing' || lower === 'running') return 'Processing';\n if (lower === 'failed' || lower === 'error') return 'Failed';\n return 'Pending';\n }\n\n public formatRelativeTime(dateStr: string | null | undefined): string {\n if (!dateStr) return 'Never';\n const now = new Date();\n const then = new Date(dateStr);\n const diffMs = now.getTime() - then.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins}m ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours}h ago`;\n const diffDays = Math.floor(diffHours / 24);\n return `${diffDays}d ago`;\n }\n\n /** Looks up the cron expression for a cached ScheduledAction by ID */\n private getScheduledActionCron(scheduledActionID: string): string | null {\n const cached = this._scheduledActions.get(NormalizeUUID(scheduledActionID));\n return cached?.CronExpression ?? null;\n }\n\n /** Returns the CSS class for a pipeline status badge color */\n public GetStatusBadgeClass(status: ItemPipelineStatus): string {\n switch (status) {\n case 'Complete': return 'at-status-badge-complete';\n case 'Processing': return 'at-status-badge-processing';\n case 'Failed': return 'at-status-badge-failed';\n case 'Pending': return 'at-status-badge-pending';\n }\n }\n\n // ════════════════════════════════════════════\n // DELETE\n // ════════════════════════════════════════════\n\n public async DeleteSource(card: SourceCard): Promise<void> {\n if (!confirm(`Delete source \"${card.Name}\"? This cannot be undone.`)) return;\n\n try {\n const p = this.ProviderToUse;\n const entity = await p.GetEntityObject<BaseEntity>('MJ: Content Sources', p.CurrentUser);\n await entity.InnerLoad(new CompositeKey([{ FieldName: 'ID', Value: card.ID }]));\n const deleted = await entity.Delete();\n if (deleted) {\n MJNotificationService.Instance.CreateSimpleNotification('Source deleted', 'success', 2500);\n this.DataChanged.emit();\n } else {\n MJNotificationService.Instance.CreateSimpleNotification('Failed to delete source', 'error', 3000);\n }\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 4000);\n }\n }\n\n // ════════════════════════════════════════════\n // SCHEDULE DIALOG — Quick Schedule for Source\n // ════════════════════════════════════════════\n\n public OpenScheduleDialog(card: SourceCard): void {\n this.SchedulingSourceCard = card;\n this.ScheduleCron = '0 2 * * *';\n this.ScheduleEnabled = true;\n this.ShowScheduleDialog = true;\n this.cdr.detectChanges();\n }\n\n public CloseScheduleDialog(): void {\n this.ShowScheduleDialog = false;\n this.SchedulingSourceCard = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Saves a new ScheduledAction for the current source, links it via\n * ContentSource.ScheduledActionID, and creates the default action params\n * for the Autotag and Vectorize action.\n */\n public async SaveSchedule(): Promise<void> {\n if (this.ScheduleSaving || !this.SchedulingSourceCard) return;\n this.ScheduleSaving = true;\n this.cdr.detectChanges();\n\n const card = this.SchedulingSourceCard;\n\n try {\n const p = this.ProviderToUse;\n\n // 1. Find the \"Autotag and Vectorize Content\" action\n const actionID = await this.findAutotagActionID();\n if (!actionID) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Could not find the \"Autotag and Vectorize Content\" action. Please check action configuration.',\n 'error', 5000\n );\n return;\n }\n\n // 2. Create the ScheduledAction\n const scheduledAction = await p.GetEntityObject<MJScheduledActionEntity>('MJ: Scheduled Actions', p.CurrentUser);\n scheduledAction.NewRecord();\n scheduledAction.Name = `Autotag: ${card.Name}`;\n scheduledAction.Description = `Automated classification pipeline for content source \"${card.Name}\"`;\n scheduledAction.ActionID = actionID;\n scheduledAction.Type = 'Custom';\n scheduledAction.CronExpression = this.ScheduleCron;\n scheduledAction.CustomCronExpression = this.ScheduleCron;\n scheduledAction.Status = this.ScheduleEnabled ? 'Active' : 'Disabled';\n scheduledAction.Timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const saved = await scheduledAction.Save();\n if (!saved) {\n const errorDetail = scheduledAction.LatestResult?.CompleteMessage ?? 'Unknown error';\n MJNotificationService.Instance.CreateSimpleNotification(\n `Failed to create schedule: ${errorDetail}`, 'error', 5000\n );\n return;\n }\n\n // 3. Create ScheduledActionParam for sourceIDs\n await this.createSourceIDParam(scheduledAction.ID, actionID, card.ID);\n\n // 4. Link ScheduledAction to ContentSource\n await this.linkScheduleToSource(card.ID, scheduledAction.ID);\n\n // 5. Cache the new action for cron display\n this._scheduledActions.set(NormalizeUUID(scheduledAction.ID), scheduledAction);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n `Schedule created: ${CronToHumanReadable(this.ScheduleCron)}`, 'success', 3000\n );\n\n this.CloseScheduleDialog();\n this.DataChanged.emit();\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n console.error('[Classify] Schedule creation error:', error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 5000);\n } finally {\n this.ScheduleSaving = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Removes the schedule from a source card by unlinking the ScheduledActionID.\n */\n public async RemoveSchedule(card: SourceCard): Promise<void> {\n if (!card.ScheduledActionID) return;\n if (!confirm(`Remove the schedule \"${card.ScheduleDescription ?? 'schedule'}\" from \"${card.Name}\"?`)) return;\n\n try {\n await this.linkScheduleToSource(card.ID, null);\n MJNotificationService.Instance.CreateSimpleNotification('Schedule removed from source', 'success', 2500);\n this.DataChanged.emit();\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 4000);\n }\n }\n\n /** Returns the human-readable schedule description for a source card. */\n public GetScheduleLabel(card: SourceCard): string {\n return card.ScheduleDescription ?? 'Scheduled';\n }\n\n /** Returns a human-readable preview of a cron expression for the schedule dialog. */\n public GetCronPreview(cron: string): string {\n return CronToHumanReadable(cron);\n }\n\n /** Finds the Action ID for \"Autotag and Vectorize Content\" by querying actions */\n private async findAutotagActionID(): Promise<string | null> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ID: string }>({\n EntityName: 'Actions',\n ExtraFilter: `Name = 'Autotag and Vectorize Content'`,\n Fields: ['ID'],\n ResultType: 'simple',\n MaxRows: 1,\n });\n if (result.Success && result.Results.length > 0) {\n return result.Results[0].ID;\n }\n return null;\n }\n\n /**\n * Creates a ScheduledActionParam that passes the source ID to the action.\n * Looks up the \"EntityNames\" action param and sets the source ID as its value.\n */\n private async createSourceIDParam(scheduledActionID: string, actionID: string, sourceID: string): Promise<void> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const paramResult = await rv.RunView<{ ID: string; Name: string }>({\n EntityName: 'Action Params',\n ExtraFilter: `ActionID = '${actionID}' AND Name = 'EntityNames'`,\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 1,\n });\n\n if (!paramResult.Success || paramResult.Results.length === 0) {\n console.warn('[Classify] Could not find EntityNames action param for source ID scheduling');\n return;\n }\n\n const p = this.ProviderToUse;\n const param = await p.GetEntityObject<MJScheduledActionParamEntity>('MJ: Scheduled Action Params', p.CurrentUser);\n param.NewRecord();\n param.ScheduledActionID = scheduledActionID;\n param.ActionParamID = paramResult.Results[0].ID;\n param.ValueType = 'Static';\n param.Value = sourceID;\n\n const saved = await param.Save();\n if (!saved) {\n console.warn('[Classify] Failed to save schedule param:', param.LatestResult?.CompleteMessage);\n }\n }\n\n /**\n * Links (or unlinks) a ScheduledAction to a ContentSource by updating\n * the ContentSource.ScheduledActionID field.\n */\n private async linkScheduleToSource(sourceID: string, scheduledActionID: string | null): Promise<void> {\n const p = this.ProviderToUse;\n const entity = await p.GetEntityObject<MJContentSourceEntity>('MJ: Content Sources', p.CurrentUser);\n await entity.InnerLoad(new CompositeKey([{ FieldName: 'ID', Value: sourceID }]));\n entity.ScheduledActionID = scheduledActionID;\n const saved = await entity.Save();\n if (!saved) {\n throw new Error(entity.LatestResult?.CompleteMessage ?? 'Failed to update content source');\n }\n }\n\n // ════════════════════════════════════════════\n // SOURCE DETAIL SLIDE-IN\n // ════════════════════════════════════════════\n\n public async OpenSourceDetail(card: SourceCard): Promise<void> {\n this.SourceDetailLoading = true;\n this.SourceDetailPage = 0;\n this.SourceDetailStatusFilter = 'All';\n this.ShowSourceDetail = true;\n this.cdr.detectChanges();\n\n try {\n const sourceItems = await this.loadContentItemsForSource(card.ID);\n const sourceRuns = await this.loadRunHistoryForSource(card.ID);\n\n const embeddingModelName = this.resolveEmbeddingModelName(card.EmbeddingModelID);\n const vectorIndexName = this.resolveVectorIndexName(card.VectorIndexID);\n const errorCount = sourceRuns.filter(r => r.StatusClass === 'failed').length;\n\n this.SelectedSource = {\n ID: card.ID,\n Name: card.Name,\n SourceTypeName: card.SourceTypeName,\n FileTypeName: card.FileTypeName,\n ContentTypeName: card.ContentTypeName,\n RequiresFileType: card.RequiresFileType,\n StatusClass: card.StatusClass,\n StatusLabel: card.StatusLabel,\n Icon: card.Icon,\n URL: card.URL,\n EmbeddingModelName: embeddingModelName,\n VectorIndexName: vectorIndexName,\n ItemCount: card.ItemCount,\n TagCount: card.TagCount,\n AvgTags: card.AvgTags,\n LastRunAgo: card.LastRunAgo,\n ErrorCount: errorCount,\n ContentItems: sourceItems,\n RunHistory: sourceRuns\n };\n } catch (error) {\n console.error('[Autotagging] Error loading source detail:', error);\n } finally {\n this.SourceDetailLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n public CloseSourceDetail(): void {\n this.ShowSourceDetail = false;\n this.SelectedSource = null;\n this.cdr.detectChanges();\n }\n\n public OpenContentItemDetail(item: ContentItemDetail): void {\n this.OpenContentItemRequested.emit(item);\n }\n\n public OpenEditSourceFromDetail(): void {\n if (!this.SelectedSource) return;\n const card = this.SourceCards.find(c => UUIDsEqual(c.ID, this.SelectedSource!.ID));\n if (card) {\n this.CloseSourceDetail();\n this.EditSourceRequested.emit(card);\n }\n }\n\n public RunSourceFromDetail(): void {\n if (!this.SelectedSource) return;\n const sourceID = this.SelectedSource.ID;\n this.CloseSourceDetail();\n this.RunSourceRequested.emit(sourceID);\n }\n\n public async DeleteSourceFromDetail(): Promise<void> {\n if (!this.SelectedSource) return;\n const card = this.SourceCards.find(c => UUIDsEqual(c.ID, this.SelectedSource!.ID));\n if (card) {\n this.CloseSourceDetail();\n await this.DeleteSource(card);\n }\n }\n\n // ── Source-detail filtering + pagination ──\n\n public get FilteredSourceDetailItems(): ContentItemDetail[] {\n if (!this.SelectedSource) return [];\n const items = this.SourceDetailStatusFilter === 'All'\n ? this.SelectedSource.ContentItems\n : this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === this.SourceDetailStatusFilter ||\n ci.TaggingStatus === this.SourceDetailStatusFilter\n );\n const start = this.SourceDetailPage * this.SourceDetailPageSize;\n return items.slice(start, start + this.SourceDetailPageSize);\n }\n\n public get FilteredSourceDetailTotal(): number {\n if (!this.SelectedSource) return 0;\n if (this.SourceDetailStatusFilter === 'All') return this.SelectedSource.ContentItems.length;\n return this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === this.SourceDetailStatusFilter ||\n ci.TaggingStatus === this.SourceDetailStatusFilter\n ).length;\n }\n\n public get SourceDetailTotalPages(): number {\n return Math.max(1, Math.ceil(this.FilteredSourceDetailTotal / this.SourceDetailPageSize));\n }\n\n public SourceDetailPrevPage(): void {\n if (this.SourceDetailPage > 0) {\n this.SourceDetailPage--;\n this.cdr.detectChanges();\n }\n }\n\n public SourceDetailNextPage(): void {\n if (this.SourceDetailPage < this.SourceDetailTotalPages - 1) {\n this.SourceDetailPage++;\n this.cdr.detectChanges();\n }\n }\n\n public OnSourceDetailStatusFilterChange(): void {\n this.SourceDetailPage = 0;\n this.cdr.detectChanges();\n }\n\n /**\n * Placeholder handler for retrying failed items in source detail. Surfaces a\n * notification; the pipeline re-processes failed items on the next run.\n */\n public RetryFailedItems(): void {\n if (!this.SelectedSource) return;\n const failedCount = this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === 'Failed' || ci.TaggingStatus === 'Failed'\n ).length;\n if (failedCount === 0) {\n MJNotificationService.Instance.CreateSimpleNotification('No failed items to retry', 'info', 2500);\n return;\n }\n MJNotificationService.Instance.CreateSimpleNotification(\n `Retry queued for ${failedCount} failed item${failedCount > 1 ? 's' : ''}. Pipeline will re-process on next run.`,\n 'info',\n 3000\n );\n }\n\n private async loadContentItemsForSource(sourceId: string): Promise<ContentItemDetail[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView({\n EntityName: 'MJ: Content Items',\n ExtraFilter: `ContentSourceID='${sourceId}'`,\n OrderBy: '__mj_UpdatedAt DESC',\n MaxRows: 100,\n ResultType: 'simple'\n });\n\n if (!result.Success) return [];\n\n const tagsByItem = this.countTagsByItem();\n return result.Results.map(item => {\n const itemId = item['ID'] as string;\n const allTags = this.getAllWeightedTagsForItem(itemId);\n const tagCount = tagsByItem.get(itemId) ?? allTags.length;\n const contentSourceTypeID = (item['ContentSourceTypeID'] as string) ?? '';\n const itemStatuses = this.inferPipelineStatuses(item, tagCount);\n return {\n ID: itemId,\n Name: deriveDisplayName({ Name: item['Name'] as string | null, Description: item['Description'] as string | null }),\n SourceName: (item['ContentSource'] as string) ?? '',\n SourceTypeName: (item['ContentSourceType'] as string) ?? '',\n ContentTypeName: (item['ContentType'] as string) ?? '',\n FileTypeName: (item['ContentFileType'] as string) ?? '',\n URL: (item['URL'] as string) ?? '',\n TextContent: (item['Text'] as string) ?? '',\n Checksum: (item['Checksum'] as string) ?? '',\n Tags: allTags,\n CreatedAt: formatDate((item['__mj_CreatedAt'] as string) ?? ''),\n UpdatedAt: formatDate((item['__mj_UpdatedAt'] as string) ?? ''),\n ContentSourceID: sourceId,\n ContentSourceTypeID: contentSourceTypeID,\n StatusDot: tagCount > 0 ? 'complete' : 'processing',\n TagCount: tagCount,\n RequiresContentType: this.sourceTypeRequiresFileType(contentSourceTypeID),\n EntityRecordID: this.resolveEntityRecordID(item),\n EntityName: this.resolveEntityName(sourceId),\n EmbeddingStatus: itemStatuses.EmbeddingStatus,\n TaggingStatus: itemStatuses.TaggingStatus,\n };\n });\n }\n\n private async loadRunHistoryForSource(sourceId: string): Promise<RunHistoryRow[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView({\n EntityName: 'MJ: Content Process Runs',\n ExtraFilter: `SourceID='${sourceId}'`,\n OrderBy: 'StartTime DESC',\n MaxRows: 10,\n ResultType: 'simple'\n });\n\n if (!result.Success) return [];\n\n return result.Results.map(run => {\n const status = (run['Status'] as string) ?? 'Unknown';\n const startTime = run['StartTime'] as string | null;\n const endTime = run['EndTime'] as string | null;\n const duration = computeDuration(startTime, endTime);\n const processedItems = run['ProcessedItems'] as number | null;\n const errorCount = run['ErrorCount'] as number | null;\n const statusLower = status.toLowerCase();\n const isFailed = statusLower === 'error' || statusLower === 'failed';\n const isRunning = statusLower === 'running' || statusLower === 'processing';\n const hasErrors = (errorCount ?? 0) > 0;\n\n return {\n ID: run['ID'] as string,\n Status: displayStatus(status),\n StatusClass: isFailed ? 'failed' : isRunning ? 'running' : 'complete',\n SourceName: (run['Source'] as string) ?? 'Unknown',\n StartedDisplay: startTime ? formatDate(startTime) : '—',\n Duration: duration,\n Items: processedItems != null ? formatNumber(processedItems) : '—',\n Tags: '—',\n Errors: hasErrors ? formatNumber(errorCount!) : (isFailed ? status : '0'),\n ErrorClass: isFailed || hasErrors ? 'run-error-text' : ''\n };\n });\n }\n}\n","<mj-page-header-interior\n Title=\"Content Sources\"\n Subtitle=\"Configure where content is ingested from\">\n <div actions>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"Refresh()\" [disabled]=\"IsLoading\">\n @if (IsLoading) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> <span class=\"mj-action-label\">Refreshing…</span>\n } @else {\n <i class=\"fa-solid fa-arrows-rotate\"></i> <span class=\"mj-action-label\">Refresh</span>\n }\n </button>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"onAddSourceGuided()\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> <span class=\"mj-action-label\">Add Source (Guided)</span>\n </button>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"mj-action-label\">Add Source</span>\n </button>\n </div>\n</mj-page-header-interior>\n\n<mj-page-body-interior [Padding]=\"false\" [Flex]=\"true\">\n <div class=\"at-main-area\">\n @if (IsLoading) {\n <div class=\"at-loading-overlay\">\n <mj-loading text=\"Refreshing sources…\"></mj-loading>\n </div>\n }\n <div class=\"at-page-body\">\n @if (SourceCards.length === 0 && !IsLoading) {\n <div class=\"at-sources-empty\">\n <i class=\"fa-solid fa-database\"></i>\n <h3>No content sources yet</h3>\n <p>Use the guided setup to stand up your first source — pick an entity or URL, configure its document, taxonomy, and domain context in one flow.</p>\n <div class=\"at-sources-empty-actions\">\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddSourceGuided()\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> Add Source (Guided)\n </button>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus\"></i> Add manually\n </button>\n </div>\n </div>\n }\n\n <div class=\"at-sources-grid\">\n @for (card of SourceCards; track card.ID) {\n <div class=\"at-source-card-full at-source-card-clickable\" (click)=\"OpenSourceDetail(card)\">\n <div class=\"at-source-card-header\">\n <div class=\"at-source-card-icon\"><i [class]=\"card.Icon\"></i></div>\n <div>\n <div class=\"at-source-card-title\">{{ card.Name }}</div>\n <div class=\"at-source-card-type\">{{ card.SourceTypeName }}@if (card.RequiresFileType) { · {{ card.FileTypeName }}}</div>\n </div>\n <div class=\"at-source-card-status\" [class]=\"card.StatusClass\">\n <div class=\"at-source-mini-status\" [class]=\"card.StatusClass\"></div>\n {{ card.StatusLabel }}\n </div>\n </div>\n @if (card.URL) {\n <div class=\"at-source-card-url\">{{ card.URL }}</div>\n }\n <div class=\"at-source-card-stats\">\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ formatNumber(card.ItemCount) }}</div>\n <div class=\"at-source-stat-label\">Items</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ formatNumber(card.TagCount) }}</div>\n <div class=\"at-source-stat-label\">Tags</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ card.AvgTags }}</div>\n <div class=\"at-source-stat-label\">Avg Tags</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ card.LastRunAgo }}</div>\n <div class=\"at-source-stat-label\">Last Run</div>\n </div>\n </div>\n <!-- Schedule indicator -->\n @if (card.ScheduledActionID) {\n <div class=\"at-schedule-indicator\" (click)=\"RemoveSchedule(card); $event.stopPropagation()\" title=\"Click to remove schedule\">\n <i class=\"fa-regular fa-clock\"></i>\n <span>{{ GetScheduleLabel(card) }}</span>\n </div>\n }\n <div class=\"at-source-card-actions\">\n <button class=\"at-source-action-btn\" (click)=\"onEditSource(card); $event.stopPropagation()\"><i class=\"fa-solid fa-pen\"></i> Edit</button>\n <button class=\"at-source-action-btn\" (click)=\"onRunSource(card.ID); $event.stopPropagation()\"><i class=\"fa-solid fa-play\"></i> Run</button>\n <button class=\"at-source-action-btn\" (click)=\"OpenDryRunPreview(card); $event.stopPropagation()\"><i class=\"fa-solid fa-flask\"></i> Preview</button>\n @if (!card.ScheduledActionID) {\n <button class=\"at-source-action-btn at-source-schedule-btn\" (click)=\"OpenScheduleDialog(card); $event.stopPropagation()\"><i class=\"fa-regular fa-clock\"></i> Schedule</button>\n }\n <button class=\"at-source-action-btn at-source-delete-btn\" (click)=\"DeleteSource(card); $event.stopPropagation()\"><i class=\"fa-solid fa-trash\"></i> Delete</button>\n </div>\n </div>\n }\n\n <!-- Add Source Card -->\n <div class=\"at-add-source-card\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus-circle\"></i>\n <span style=\"font-size: 0.85rem; font-weight: 600;\">Add Content Source</span>\n <span style=\"font-size: 0.72rem;\">Web, RSS, Email, Files, API</span>\n </div>\n </div>\n </div>\n </div>\n</mj-page-body-interior>\n\n<!-- ══════ SOURCE DETAIL SLIDE-IN ══════ -->\n@if (ShowSourceDetail) {\n <div class=\"at-slide-overlay\" (click)=\"CloseSourceDetail()\"></div>\n <div class=\"at-slide-panel at-detail-panel\">\n <div class=\"at-slide-header\">\n <h3><i class=\"fa-solid fa-database\"></i> Source Detail</h3>\n <button class=\"at-slide-close\" aria-label=\"Close source detail\" (click)=\"CloseSourceDetail()\"><i class=\"fa-solid fa-times\"></i></button>\n </div>\n <div class=\"at-slide-body\">\n @if (SourceDetailLoading) {\n <div class=\"at-loading-overlay\">\n <mj-loading text=\"Loading source details...\"></mj-loading>\n </div>\n }\n @if (!SourceDetailLoading && SelectedSource) {\n <!-- Source Header -->\n <div class=\"at-detail-source-header\">\n <div class=\"at-source-card-icon\"><i [class]=\"SelectedSource.Icon\"></i></div>\n <div>\n <h4 class=\"at-detail-item-name\">{{ SelectedSource.Name }}</h4>\n <div class=\"at-detail-badges\">\n <span class=\"at-detail-badge at-detail-badge-type\">{{ SelectedSource.SourceTypeName }}</span>\n <span class=\"at-detail-badge\" [class]=\"'at-detail-badge-status-' + SelectedSource.StatusClass\">\n {{ SelectedSource.StatusLabel }}\n </span>\n </div>\n </div>\n </div>\n\n <!-- Configuration -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Configuration</div>\n <div class=\"at-detail-meta-grid\">\n @if (SelectedSource.URL) {\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">URL</span>\n <a [href]=\"SelectedSource.URL\" target=\"_blank\" class=\"at-detail-link at-detail-meta-value\">{{ SelectedSource.URL }}</a>\n </div>\n }\n @if (SelectedSource.RequiresFileType) {\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Content Type</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.ContentTypeName }}</span>\n </div>\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">File Type</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.FileTypeName }}</span>\n </div>\n }\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Embedding Model</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.EmbeddingModelName }}</span>\n </div>\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Vector Index</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.VectorIndexName }}</span>\n </div>\n </div>\n </div>\n\n <!-- Stats -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Statistics</div>\n <div class=\"at-detail-stats-strip\">\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ formatNumber(SelectedSource.ItemCount) }}</div>\n <div class=\"at-detail-stat-label\">Items</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ formatNumber(SelectedSource.TagCount) }}</div>\n <div class=\"at-detail-stat-label\">Tags</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ SelectedSource.AvgTags }}</div>\n <div class=\"at-detail-stat-label\">Avg Tags</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ SelectedSource.LastRunAgo }}</div>\n <div class=\"at-detail-stat-label\">Last Run</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\" [class.at-kpi-error-value]=\"SelectedSource.ErrorCount > 0\">{{ SelectedSource.ErrorCount }}</div>\n <div class=\"at-detail-stat-label\">Errors</div>\n </div>\n </div>\n </div>\n\n <!-- Content Library (status badges, pagination) -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-header-row\">\n <div class=\"at-detail-section-label\">Content Library ({{ FilteredSourceDetailTotal }} of {{ SelectedSource.ItemCount | number }})</div>\n <div class=\"at-detail-section-controls\">\n <select class=\"at-detail-filter-select\" [(ngModel)]=\"SourceDetailStatusFilter\" (ngModelChange)=\"OnSourceDetailStatusFilterChange()\">\n @for (opt of SourceDetailStatusOptions; track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n <button class=\"at-action-btn at-retry-btn\" (click)=\"RetryFailedItems()\" title=\"Re-queue failed items for processing\">\n <i class=\"fa-solid fa-rotate-right\"></i> Retry Failed\n </button>\n </div>\n </div>\n <div class=\"at-detail-content-list\">\n @if (FilteredSourceDetailItems.length === 0) {\n <div class=\"at-empty-state\" style=\"padding: 16px;\">\n <p>{{ SourceDetailStatusFilter === 'All' ? 'No content items yet.' : 'No items match this filter.' }}</p>\n </div>\n }\n @for (ci of FilteredSourceDetailItems; track ci.ID) {\n <div class=\"at-detail-content-item\" (click)=\"OpenContentItemDetail(ci)\">\n <div class=\"at-feed-status-dot\" [class]=\"ci.StatusDot\"></div>\n <span class=\"at-detail-content-item-name\">{{ ci.Name }}</span>\n <span class=\"at-status-badge\" [class]=\"GetStatusBadgeClass(ci.EmbeddingStatus)\">E:{{ ci.EmbeddingStatus }}</span>\n <span class=\"at-status-badge\" [class]=\"GetStatusBadgeClass(ci.TaggingStatus)\">T:{{ ci.TaggingStatus }}</span>\n <span class=\"at-detail-content-item-tags\">{{ ci.TagCount }} tags</span>\n <span class=\"at-detail-content-item-time\">{{ ci.UpdatedAt }}</span>\n </div>\n }\n </div>\n <!-- Pagination -->\n @if (SourceDetailTotalPages > 1) {\n <div class=\"at-detail-pagination\">\n <button class=\"at-page-btn\" [disabled]=\"SourceDetailPage === 0\" (click)=\"SourceDetailPrevPage()\">\n <i class=\"fa-solid fa-chevron-left\"></i> Prev\n </button>\n <span class=\"at-page-info\">Page {{ SourceDetailPage + 1 }} of {{ SourceDetailTotalPages }}</span>\n <button class=\"at-page-btn\" [disabled]=\"SourceDetailPage >= SourceDetailTotalPages - 1\" (click)=\"SourceDetailNextPage()\">\n Next <i class=\"fa-solid fa-chevron-right\"></i>\n </button>\n </div>\n }\n </div>\n\n <!-- Run History -->\n @if (SelectedSource.RunHistory.length > 0) {\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Recent Runs</div>\n <div class=\"at-detail-run-history\">\n @for (run of SelectedSource.RunHistory; track run.ID) {\n <div class=\"at-detail-run-row\">\n <span class=\"at-run-status-badge\" [class]=\"run.StatusClass\">{{ run.Status }}</span>\n <span class=\"at-detail-run-time\">{{ run.StartedDisplay }}</span>\n <span class=\"at-detail-run-duration\">{{ run.Duration }}</span>\n <span class=\"at-detail-run-items\">{{ run.Items }} items</span>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Actions -->\n <div class=\"at-detail-actions\">\n <button class=\"at-action-btn at-primary-btn\" (click)=\"OpenEditSourceFromDetail()\">\n <i class=\"fa-solid fa-pen\"></i> Edit\n </button>\n <button class=\"at-action-btn at-secondary-btn\" (click)=\"RunSourceFromDetail()\">\n <i class=\"fa-solid fa-play\"></i> Run Now\n </button>\n <button class=\"at-action-btn at-secondary-btn at-source-delete-btn\" (click)=\"DeleteSourceFromDetail()\">\n <i class=\"fa-solid fa-trash\"></i> Delete\n </button>\n </div>\n }\n </div>\n </div>\n}\n\n<!-- ══════ SCHEDULE DIALOG ══════ -->\n@if (ShowScheduleDialog && SchedulingSourceCard) {\n <div class=\"at-schedule-overlay\" (click)=\"CloseScheduleDialog()\">\n <div class=\"at-schedule-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"at-schedule-dialog-header\">\n <h3><i class=\"fa-regular fa-clock\"></i> Schedule Pipeline</h3>\n <button class=\"at-schedule-dialog-close\" (click)=\"CloseScheduleDialog()\" aria-label=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"at-schedule-dialog-body\">\n <div class=\"at-schedule-field\">\n <label>Source</label>\n <div class=\"at-schedule-source-name\">\n <i [class]=\"SchedulingSourceCard.Icon\"></i>\n {{ SchedulingSourceCard.Name }}\n </div>\n </div>\n <div class=\"at-schedule-field\">\n <label>Action</label>\n <div class=\"at-schedule-action-name\">Autotag and Vectorize Content</div>\n </div>\n <div class=\"at-schedule-field\">\n <label for=\"schedule-cron\">Cron Expression</label>\n <input id=\"schedule-cron\"\n type=\"text\"\n class=\"mj-input at-schedule-cron-input\"\n [(ngModel)]=\"ScheduleCron\"\n placeholder=\"0 2 * * *\" />\n <div class=\"at-schedule-cron-preview\">\n <i class=\"fa-solid fa-info-circle\"></i>\n {{ GetCronPreview(ScheduleCron) }}\n </div>\n </div>\n <div class=\"at-schedule-field at-schedule-toggle-row\">\n <label for=\"schedule-enabled\">Enabled</label>\n <input id=\"schedule-enabled\"\n type=\"checkbox\"\n class=\"mj-checkbox\"\n [(ngModel)]=\"ScheduleEnabled\" />\n </div>\n </div>\n <div class=\"at-schedule-dialog-footer\">\n <button class=\"at-action-btn at-primary-btn\" (click)=\"SaveSchedule()\" [disabled]=\"ScheduleSaving\">\n @if (ScheduleSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Saving...\n } @else {\n <i class=\"fa-solid fa-check\"></i> Create Schedule\n }\n </button>\n <button class=\"at-action-btn at-secondary-btn\" (click)=\"CloseScheduleDialog()\">Cancel</button>\n </div>\n </div>\n </div>\n}\n\n<!-- ══════ DRY-RUN DISPOSITION PREVIEW (in-memory, nothing persisted) ══════ -->\n<classify-dry-run-preview\n [Provider]=\"Provider\"\n [Show]=\"ShowDryRunPreview\"\n [SourceCard]=\"DryRunSourceCard\"\n (Closed)=\"CloseDryRunPreview()\">\n</classify-dry-run-preview>\n"]}
|
|
1
|
+
{"version":3,"file":"sources-tab.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/sources-tab.component.ts","../../../../../src/AI/components/autotagging/tabs/sources-tab.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAc,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAgF,MAAM,+BAA+B,CAAC;AAKzJ,OAAO,EAAE,YAAY,EA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AO,EAChE,EACF,EACF,EACF,EACgB;YAGxB,sFAAwB;YAuKxB,iGAAkD;YAwDlD,qDAIkC;YAAhC,6HAAU,wBAAoB,IAAC;YACjC,iBAA2B;;YA9U4C,eAAsB;YAAtB,wCAAsB;YACvF,cAIC;YAJD,uCAIC;YAWgB,gBAAiB;YAAC,AAAlB,+BAAiB,cAAc;YAElD,eAIC;YAJD,yCAIC;YAEC,eAcC;YAdD,0EAcC;YAGC,eAmDC;YAnDD,8BAmDC;YAcT,eAoKC;YApKD,gDAoKC;YAGD,cAqDC;YArDD,8EAqDC;YAIC,cAAqB;YAErB,AADA,AADA,uCAAqB,+BACK,oCACK;;;iFD/SpB,2BAA2B;cANvC,SAAS;6BACM,KAAK,YACP,sBAAsB;;kBAW/B,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAyCL,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kBAEN,MAAM;;kFAvIE,2BAA2B","sourcesContent":["/**\n * @fileoverview Classify · Content Sources tab.\n *\n * Self-contained sub-page: owns its header-interior, the source cards grid,\n * the per-source detail slide-in, and the quick-schedule dialog. Receives the\n * shared raw data needed to build the cards (sources, items, tags, runs, and\n * the cached ScheduledAction + EntityRecordDocument lookups) from the host\n * orchestrator via `@Input()`. Cross-tab concerns — opening the add/edit slide-in\n * form, running the pipeline, opening a content-item detail, and reloading the\n * shared source list after a mutation — bubble up via `@Output()`.\n *\n * Out of scope (stays in the host): the add/edit source slide-in FORM, the\n * pipeline tab, and the Content Duplicates section.\n */\nimport { Component, ChangeDetectorRef, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { BaseEntity, CompositeKey, RunView } from '@memberjunction/core';\nimport { UUIDsEqual, NormalizeUUID } from '@memberjunction/global';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { KnowledgeHubMetadataEngine, MJScheduledActionEntity, MJScheduledActionParamEntity, MJContentSourceEntity } from '@memberjunction/core-entities';\nimport {\n SourceCard, SourceDetailInfo, ContentItemDetail, RunHistoryRow, WeightedTag,\n ItemPipelineStatus\n} from '../shared/classify.types';\nimport { formatNumber, formatDate, computeDuration, displayStatus, getSourceTypeIcon, CronToHumanReadable, deriveDisplayName } from '../shared/classify.format';\n\n@Component({\n standalone: false,\n selector: 'classify-sources-tab',\n templateUrl: './sources-tab.component.html',\n styleUrls: ['./sources-tab.component.css']\n})\nexport class ClassifySourcesTabComponent extends BaseAngularComponent {\n private cdr = inject(ChangeDetectorRef);\n\n // ── Shared raw inputs (host is the data orchestrator) ──\n\n /** Raw `MJ: Content Sources` rows — the primary source for the cards. */\n private _sources: Record<string, unknown>[] = [];\n @Input()\n set Sources(value: Record<string, unknown>[]) {\n this._sources = value ?? [];\n this.rebuild();\n }\n get Sources(): Record<string, unknown>[] {\n return this._sources;\n }\n\n /** Raw `MJ: Content Items` rows — used to count items per source. */\n private _items: Record<string, unknown>[] = [];\n @Input()\n set Items(value: Record<string, unknown>[]) {\n this._items = value ?? [];\n this.rebuild();\n }\n get Items(): Record<string, unknown>[] {\n return this._items;\n }\n\n /** Raw `MJ: Content Item Tags` rows — used to count tags per source. */\n private _tags: Record<string, unknown>[] = [];\n @Input()\n set Tags(value: Record<string, unknown>[]) {\n this._tags = value ?? [];\n this.rebuild();\n }\n get Tags(): Record<string, unknown>[] {\n return this._tags;\n }\n\n /** Raw `MJ: Content Process Runs` rows — used to derive last-run + status. */\n private _runs: Record<string, unknown>[] = [];\n @Input()\n set Runs(value: Record<string, unknown>[]) {\n this._runs = value ?? [];\n this.rebuild();\n }\n get Runs(): Record<string, unknown>[] {\n return this._runs;\n }\n\n /** Accurate total item count from TotalRowCount (used when a single source exists). */\n private _totalItemCount = 0;\n @Input()\n set TotalItemCount(value: number) {\n this._totalItemCount = value ?? 0;\n this.rebuild();\n }\n get TotalItemCount(): number {\n return this._totalItemCount;\n }\n\n /** Accurate total tag count from TotalRowCount (used when a single source exists). */\n private _totalTagCount = 0;\n @Input()\n set TotalTagCount(value: number) {\n this._totalTagCount = value ?? 0;\n this.rebuild();\n }\n get TotalTagCount(): number {\n return this._totalTagCount;\n }\n\n /** Cached ScheduledAction entities, keyed by normalized ID, supplied by the host. */\n private _scheduledActions = new Map<string, MJScheduledActionEntity>();\n @Input()\n set ScheduledActions(value: Map<string, MJScheduledActionEntity>) {\n this._scheduledActions = value ?? new Map<string, MJScheduledActionEntity>();\n this.rebuild();\n }\n get ScheduledActions(): Map<string, MJScheduledActionEntity> {\n return this._scheduledActions;\n }\n\n /** Cache: EntityRecordDocument ID → RecordID, supplied by the host. */\n private _entityRecordDocCache = new Map<string, string>();\n @Input()\n set EntityRecordDocCache(value: Map<string, string>) {\n this._entityRecordDocCache = value ?? new Map<string, string>();\n }\n get EntityRecordDocCache(): Map<string, string> {\n return this._entityRecordDocCache;\n }\n\n // ── Tab-local view state ──\n\n /** Shown while a manual Refresh() recomputes the source cards. */\n public IsLoading = false;\n\n public SourceCards: SourceCard[] = [];\n\n // Source Detail slide-in\n public SelectedSource: SourceDetailInfo | null = null;\n public ShowSourceDetail = false;\n public SourceDetailLoading = false;\n public SourceDetailStatusFilter: ItemPipelineStatus | 'All' = 'All';\n public readonly SourceDetailStatusOptions: (ItemPipelineStatus | 'All')[] = ['All', 'Complete', 'Processing', 'Failed', 'Pending'];\n public SourceDetailPage = 0;\n public readonly SourceDetailPageSize = 10;\n\n // Dry-run preview dialog (hosted here, like the schedule + detail dialogs)\n public ShowDryRunPreview = false;\n public DryRunSourceCard: SourceCard | null = null;\n\n // Schedule dialog\n public ShowScheduleDialog = false;\n public ScheduleSaving = false;\n public SchedulingSourceCard: SourceCard | null = null;\n public ScheduleCron = '0 2 * * *';\n public ScheduleEnabled = true;\n\n /** Template-facing formatter. */\n public readonly formatNumber = formatNumber;\n\n // ── Cross-tab intents (host owns the slide-in form, navigation, pipeline) ──\n\n /** Bubble \"add source\" up — host opens its slide-in CRUD form. */\n @Output() AddSourceRequested = new EventEmitter<void>();\n /** Bubble \"add source (guided)\" up — host opens the setup wizard. */\n @Output() AddSourceGuidedRequested = new EventEmitter<void>();\n /** Bubble \"edit source\" up — host opens its slide-in CRUD form pre-filled. */\n @Output() EditSourceRequested = new EventEmitter<SourceCard>();\n /** Bubble \"run pipeline for source\" up — host runs the pipeline for the given source ID. */\n @Output() RunSourceRequested = new EventEmitter<string>();\n /** Bubble \"open content item detail\" up — host owns the item-detail slide-in. */\n @Output() OpenContentItemRequested = new EventEmitter<ContentItemDetail>();\n /** Fired after a delete / schedule change so the host reloads the shared source list. */\n @Output() DataChanged = new EventEmitter<void>();\n\n /**\n * Recompute the source cards from the current host-supplied inputs. The data\n * itself is owned by the host (flows in via @Input); Refresh just rebuilds the\n * view models and surfaces a brief loading state for user feedback.\n */\n public async Refresh(): Promise<void> {\n this.IsLoading = true;\n this.cdr.detectChanges();\n this.rebuild();\n this.IsLoading = false;\n this.cdr.detectChanges();\n }\n\n public onAddSource(): void {\n this.AddSourceRequested.emit();\n }\n\n public onAddSourceGuided(): void {\n this.AddSourceGuidedRequested.emit();\n }\n\n public onEditSource(card: SourceCard): void {\n this.EditSourceRequested.emit(card);\n }\n\n public onRunSource(sourceID: string): void {\n this.RunSourceRequested.emit(sourceID);\n }\n\n // ── Dry-run preview (in-memory, nothing persisted) ──\n\n /** Opens the dry-run disposition preview for a source. */\n public OpenDryRunPreview(card: SourceCard): void {\n this.DryRunSourceCard = card;\n this.ShowDryRunPreview = true;\n this.cdr.detectChanges();\n }\n\n public CloseDryRunPreview(): void {\n this.ShowDryRunPreview = false;\n this.DryRunSourceCard = null;\n this.cdr.detectChanges();\n }\n\n // ════════════════════════════════════════════\n // SOURCE CARDS\n // ════════════════════════════════════════════\n\n /** Rebuild the source card view models from the current inputs. */\n private rebuild(): void {\n const singleSource = this._sources.length === 1;\n const itemCountBySource = singleSource ? null : this.countItemsBySource();\n const tagCountBySource = singleSource ? null : this.countTagsBySource();\n const lastRunBySource = this.getLastRunBySource();\n\n this.SourceCards = this._sources.map(source => {\n const id = source['ID'] as string;\n const itemCount = singleSource ? this._totalItemCount : (itemCountBySource!.get(id) ?? 0);\n const tagCount = singleSource ? this._totalTagCount : (tagCountBySource!.get(id) ?? 0);\n const avgTags = itemCount > 0 ? (tagCount / itemCount).toFixed(1) : '0';\n const lastRun = lastRunBySource.get(id);\n const typeName = (source['ContentSourceType'] as string) ?? 'Unknown';\n const lastRunStatus = lastRun ? (lastRun['Status'] as string)?.toLowerCase() : null;\n const hasError = lastRunStatus === 'error' || lastRunStatus === 'failed';\n\n const scheduledActionID = (source['ScheduledActionID'] as string | null) ?? null;\n const scheduledActionName = (source['ScheduledAction'] as string | null) ?? null;\n const cronExpr = scheduledActionID ? this.getScheduledActionCron(scheduledActionID) : null;\n\n return {\n ID: id,\n Name: (source['Name'] as string) ?? 'Unnamed Source',\n SourceTypeName: typeName,\n ContentTypeName: (source['ContentType'] as string) ?? 'Unknown',\n FileTypeName: (source['ContentFileType'] as string) ?? 'Unknown',\n Icon: getSourceTypeIcon(typeName),\n StatusClass: hasError ? 'error' as const : 'active' as const,\n StatusLabel: hasError ? 'Error' : 'Active',\n URL: (source['URL'] as string) ?? '',\n ItemCount: itemCount,\n TagCount: tagCount,\n AvgTags: avgTags,\n LastRunAgo: lastRun ? this.formatRelativeTime(lastRun['StartTime'] as string) : 'Never',\n ContentSourceTypeID: source['ContentSourceTypeID'] as string,\n ContentTypeID: source['ContentTypeID'] as string,\n ContentFileTypeID: source['ContentFileTypeID'] as string,\n EmbeddingModelID: (source['EmbeddingModelID'] as string) ?? '',\n VectorIndexID: (source['VectorIndexID'] as string) ?? '',\n EntityID: (source['EntityID'] as string) ?? '',\n EntityDocumentID: (source['EntityDocumentID'] as string) ?? '',\n RequiresFileType: this.sourceTypeRequiresFileType(source['ContentSourceTypeID'] as string),\n ScheduledActionID: scheduledActionID,\n ScheduledActionName: scheduledActionName,\n ScheduleDescription: cronExpr ? CronToHumanReadable(cronExpr) : null,\n };\n });\n this.cdr.detectChanges();\n }\n\n // ── Aggregation utilities (read only the raw inputs) ──\n\n private countItemsBySource(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const item of this._items) {\n const sourceId = item['ContentSourceID'] as string;\n if (sourceId) counts.set(sourceId, (counts.get(sourceId) ?? 0) + 1);\n }\n return counts;\n }\n\n private countTagsBySource(): Map<string, number> {\n const itemSourceMap = new Map<string, string>();\n for (const item of this._items) {\n itemSourceMap.set(item['ID'] as string, item['ContentSourceID'] as string);\n }\n const counts = new Map<string, number>();\n for (const tag of this._tags) {\n const sourceId = itemSourceMap.get(tag['ItemID'] as string);\n if (sourceId) counts.set(sourceId, (counts.get(sourceId) ?? 0) + 1);\n }\n return counts;\n }\n\n private getLastRunBySource(): Map<string, Record<string, unknown>> {\n const map = new Map<string, Record<string, unknown>>();\n for (const run of this._runs) {\n const sourceId = run['SourceID'] as string;\n if (sourceId && !map.has(sourceId)) {\n map.set(sourceId, run);\n }\n }\n return map;\n }\n\n private countTagsByItem(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const tag of this._tags) {\n const itemId = NormalizeUUID(tag['ItemID'] as string);\n if (itemId) counts.set(itemId, (counts.get(itemId) ?? 0) + 1);\n }\n return counts;\n }\n\n private getAllWeightedTagsForItem(itemId: string): WeightedTag[] {\n const tags: WeightedTag[] = [];\n for (const tag of this._tags) {\n if (UUIDsEqual(tag['ItemID'] as string, itemId)) {\n tags.push({\n Tag: tag['Tag'] as string,\n Weight: Number(tag['Weight'] ?? 1),\n });\n }\n }\n return tags.sort((a, b) => b.Weight - a.Weight);\n }\n\n /** Check if a source type's Configuration says RequiresFileType !== false */\n private sourceTypeRequiresFileType(sourceTypeID: string): boolean {\n try {\n const engine = KnowledgeHubMetadataEngine.Instance;\n const st = engine.ContentSourceTypes.find(t => UUIDsEqual(t.ID, sourceTypeID));\n return st?.ConfigurationObject?.RequiresFileType !== false;\n } catch {\n return true;\n }\n }\n\n /** Resolve the entity record ID from the EntityRecordDocument for entity-sourced content items */\n private resolveEntityRecordID(item: Record<string, unknown>): string | null {\n const erdID = item['EntityRecordDocumentID'] as string | null;\n if (!erdID) return null;\n return this._entityRecordDocCache.get(NormalizeUUID(erdID)) ?? null;\n }\n\n /** Resolve the entity name for an entity-sourced content source */\n private resolveEntityName(sourceId: string): string | null {\n try {\n const engine = KnowledgeHubMetadataEngine.Instance;\n const source = engine.ContentSources.find(cs => UUIDsEqual(cs.ID, sourceId));\n if (!source?.EntityID) return null;\n const md = this.ProviderToUse;\n const entityInfo = md.Entities.find(e => UUIDsEqual(e.ID, source.EntityID));\n return entityInfo?.Name ?? null;\n } catch {\n return null;\n }\n }\n\n private resolveEmbeddingModelName(modelId: string): string {\n if (!modelId) return 'System default';\n const aiEngine = AIEngineBase.Instance;\n const model = aiEngine.Models.find(m => UUIDsEqual(m.ID, modelId));\n return model ? model.Name : 'Unknown';\n }\n\n private resolveVectorIndexName(indexId: string): string {\n if (!indexId) return 'System default';\n const engine = KnowledgeHubMetadataEngine.Instance;\n const idx = engine.GetVectorIndexById(indexId);\n return idx ? idx.Name : 'Unknown';\n }\n\n /**\n * Infer embedding and tagging pipeline statuses for a content item. Uses tag\n * count + run-history heuristics since dedicated status columns are not yet\n * available on the ContentItem entity.\n */\n private inferPipelineStatuses(\n rawItem: Record<string, unknown>,\n tagCount: number\n ): { EmbeddingStatus: ItemPipelineStatus; TaggingStatus: ItemPipelineStatus } {\n const explicitEmbedding = rawItem['EmbeddingStatus'] as string | undefined;\n const explicitTagging = rawItem['TaggingStatus'] as string | undefined;\n if (explicitEmbedding || explicitTagging) {\n return {\n EmbeddingStatus: this.mapStatusString(explicitEmbedding),\n TaggingStatus: this.mapStatusString(explicitTagging),\n };\n }\n\n const hasChecksum = !!(rawItem['Checksum'] as string);\n const hasText = !!((rawItem['Text'] as string)?.trim());\n const sourceID = rawItem['ContentSourceID'] as string;\n const lastRun = this._runs.find(r => r['SourceID'] as string === sourceID);\n const lastRunFailed = lastRun &&\n ((lastRun['Status'] as string)?.toLowerCase() === 'error' ||\n (lastRun['Status'] as string)?.toLowerCase() === 'failed');\n\n let embeddingStatus: ItemPipelineStatus = 'Pending';\n if (hasChecksum || hasText) embeddingStatus = 'Complete';\n else if (lastRunFailed) embeddingStatus = 'Failed';\n\n let taggingStatus: ItemPipelineStatus = 'Pending';\n if (tagCount > 0) taggingStatus = 'Complete';\n else if (embeddingStatus === 'Complete') taggingStatus = lastRunFailed ? 'Failed' : 'Pending';\n else if (lastRunFailed) taggingStatus = 'Failed';\n\n return { EmbeddingStatus: embeddingStatus, TaggingStatus: taggingStatus };\n }\n\n private mapStatusString(status: string | undefined): ItemPipelineStatus {\n if (!status) return 'Pending';\n const lower = status.toLowerCase();\n if (lower === 'complete' || lower === 'completed' || lower === 'done') return 'Complete';\n if (lower === 'processing' || lower === 'running') return 'Processing';\n if (lower === 'failed' || lower === 'error') return 'Failed';\n return 'Pending';\n }\n\n public formatRelativeTime(dateStr: string | null | undefined): string {\n if (!dateStr) return 'Never';\n const now = new Date();\n const then = new Date(dateStr);\n const diffMs = now.getTime() - then.getTime();\n const diffMins = Math.floor(diffMs / 60000);\n\n if (diffMins < 1) return 'Just now';\n if (diffMins < 60) return `${diffMins}m ago`;\n const diffHours = Math.floor(diffMins / 60);\n if (diffHours < 24) return `${diffHours}h ago`;\n const diffDays = Math.floor(diffHours / 24);\n return `${diffDays}d ago`;\n }\n\n /** Looks up the cron expression for a cached ScheduledAction by ID */\n private getScheduledActionCron(scheduledActionID: string): string | null {\n const cached = this._scheduledActions.get(NormalizeUUID(scheduledActionID));\n return cached?.CronExpression ?? null;\n }\n\n /** Returns the CSS class for a pipeline status badge color */\n public GetStatusBadgeClass(status: ItemPipelineStatus): string {\n switch (status) {\n case 'Complete': return 'at-status-badge-complete';\n case 'Processing': return 'at-status-badge-processing';\n case 'Failed': return 'at-status-badge-failed';\n case 'Pending': return 'at-status-badge-pending';\n }\n }\n\n // ════════════════════════════════════════════\n // DELETE\n // ════════════════════════════════════════════\n\n public async DeleteSource(card: SourceCard): Promise<void> {\n if (!confirm(`Delete source \"${card.Name}\"? This cannot be undone.`)) return;\n\n try {\n const p = this.ProviderToUse;\n const entity = await p.GetEntityObject<BaseEntity>('MJ: Content Sources', p.CurrentUser);\n await entity.InnerLoad(new CompositeKey([{ FieldName: 'ID', Value: card.ID }]));\n const deleted = await entity.Delete();\n if (deleted) {\n MJNotificationService.Instance.CreateSimpleNotification('Source deleted', 'success', 2500);\n this.DataChanged.emit();\n } else {\n MJNotificationService.Instance.CreateSimpleNotification('Failed to delete source', 'error', 3000);\n }\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 4000);\n }\n }\n\n // ════════════════════════════════════════════\n // SCHEDULE DIALOG — Quick Schedule for Source\n // ════════════════════════════════════════════\n\n public OpenScheduleDialog(card: SourceCard): void {\n this.SchedulingSourceCard = card;\n this.ScheduleCron = '0 2 * * *';\n this.ScheduleEnabled = true;\n this.ShowScheduleDialog = true;\n this.cdr.detectChanges();\n }\n\n public CloseScheduleDialog(): void {\n this.ShowScheduleDialog = false;\n this.SchedulingSourceCard = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Saves a new ScheduledAction for the current source, links it via\n * ContentSource.ScheduledActionID, and creates the default action params\n * for the Autotag and Vectorize action.\n */\n public async SaveSchedule(): Promise<void> {\n if (this.ScheduleSaving || !this.SchedulingSourceCard) return;\n this.ScheduleSaving = true;\n this.cdr.detectChanges();\n\n const card = this.SchedulingSourceCard;\n\n try {\n const p = this.ProviderToUse;\n\n // 1. Find the \"Autotag and Vectorize Content\" action\n const actionID = await this.findAutotagActionID();\n if (!actionID) {\n MJNotificationService.Instance.CreateSimpleNotification(\n 'Could not find the \"Autotag and Vectorize Content\" action. Please check action configuration.',\n 'error', 5000\n );\n return;\n }\n\n // 2. Create the ScheduledAction\n const scheduledAction = await p.GetEntityObject<MJScheduledActionEntity>('MJ: Scheduled Actions', p.CurrentUser);\n scheduledAction.NewRecord();\n scheduledAction.Name = `Autotag: ${card.Name}`;\n scheduledAction.Description = `Automated classification pipeline for content source \"${card.Name}\"`;\n scheduledAction.ActionID = actionID;\n scheduledAction.Type = 'Custom';\n scheduledAction.CronExpression = this.ScheduleCron;\n scheduledAction.CustomCronExpression = this.ScheduleCron;\n scheduledAction.Status = this.ScheduleEnabled ? 'Active' : 'Disabled';\n scheduledAction.Timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const saved = await scheduledAction.Save();\n if (!saved) {\n const errorDetail = scheduledAction.LatestResult?.CompleteMessage ?? 'Unknown error';\n MJNotificationService.Instance.CreateSimpleNotification(\n `Failed to create schedule: ${errorDetail}`, 'error', 5000\n );\n return;\n }\n\n // 3. Create ScheduledActionParam for sourceIDs\n await this.createSourceIDParam(scheduledAction.ID, actionID, card.ID);\n\n // 4. Link ScheduledAction to ContentSource\n await this.linkScheduleToSource(card.ID, scheduledAction.ID);\n\n // 5. Cache the new action for cron display\n this._scheduledActions.set(NormalizeUUID(scheduledAction.ID), scheduledAction);\n\n MJNotificationService.Instance.CreateSimpleNotification(\n `Schedule created: ${CronToHumanReadable(this.ScheduleCron)}`, 'success', 3000\n );\n\n this.CloseScheduleDialog();\n this.DataChanged.emit();\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n console.error('[Classify] Schedule creation error:', error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 5000);\n } finally {\n this.ScheduleSaving = false;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Removes the schedule from a source card by unlinking the ScheduledActionID.\n */\n public async RemoveSchedule(card: SourceCard): Promise<void> {\n if (!card.ScheduledActionID) return;\n if (!confirm(`Remove the schedule \"${card.ScheduleDescription ?? 'schedule'}\" from \"${card.Name}\"?`)) return;\n\n try {\n await this.linkScheduleToSource(card.ID, null);\n MJNotificationService.Instance.CreateSimpleNotification('Schedule removed from source', 'success', 2500);\n this.DataChanged.emit();\n } catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n MJNotificationService.Instance.CreateSimpleNotification(`Error: ${msg}`, 'error', 4000);\n }\n }\n\n /** Returns the human-readable schedule description for a source card. */\n public GetScheduleLabel(card: SourceCard): string {\n return card.ScheduleDescription ?? 'Scheduled';\n }\n\n /** Returns a human-readable preview of a cron expression for the schedule dialog. */\n public GetCronPreview(cron: string): string {\n return CronToHumanReadable(cron);\n }\n\n /** Finds the Action ID for \"Autotag and Vectorize Content\" by querying actions */\n private async findAutotagActionID(): Promise<string | null> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<{ ID: string }>({\n EntityName: 'MJ: Actions',\n ExtraFilter: `Name = 'Autotag and Vectorize Content'`,\n Fields: ['ID'],\n ResultType: 'simple',\n MaxRows: 1,\n });\n if (result.Success && result.Results.length > 0) {\n return result.Results[0].ID;\n }\n return null;\n }\n\n /**\n * Creates a ScheduledActionParam that passes the source ID to the action.\n * Looks up the \"EntityNames\" action param and sets the source ID as its value.\n */\n private async createSourceIDParam(scheduledActionID: string, actionID: string, sourceID: string): Promise<void> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const paramResult = await rv.RunView<{ ID: string; Name: string }>({\n EntityName: 'MJ: Action Params',\n ExtraFilter: `ActionID = '${actionID}' AND Name = 'EntityNames'`,\n Fields: ['ID', 'Name'],\n ResultType: 'simple',\n MaxRows: 1,\n });\n\n if (!paramResult.Success || paramResult.Results.length === 0) {\n console.warn('[Classify] Could not find EntityNames action param for source ID scheduling');\n return;\n }\n\n const p = this.ProviderToUse;\n const param = await p.GetEntityObject<MJScheduledActionParamEntity>('MJ: Scheduled Action Params', p.CurrentUser);\n param.NewRecord();\n param.ScheduledActionID = scheduledActionID;\n param.ActionParamID = paramResult.Results[0].ID;\n param.ValueType = 'Static';\n param.Value = sourceID;\n\n const saved = await param.Save();\n if (!saved) {\n console.warn('[Classify] Failed to save schedule param:', param.LatestResult?.CompleteMessage);\n }\n }\n\n /**\n * Links (or unlinks) a ScheduledAction to a ContentSource by updating\n * the ContentSource.ScheduledActionID field.\n */\n private async linkScheduleToSource(sourceID: string, scheduledActionID: string | null): Promise<void> {\n const p = this.ProviderToUse;\n const entity = await p.GetEntityObject<MJContentSourceEntity>('MJ: Content Sources', p.CurrentUser);\n await entity.InnerLoad(new CompositeKey([{ FieldName: 'ID', Value: sourceID }]));\n entity.ScheduledActionID = scheduledActionID;\n const saved = await entity.Save();\n if (!saved) {\n throw new Error(entity.LatestResult?.CompleteMessage ?? 'Failed to update content source');\n }\n }\n\n // ════════════════════════════════════════════\n // SOURCE DETAIL SLIDE-IN\n // ════════════════════════════════════════════\n\n public async OpenSourceDetail(card: SourceCard): Promise<void> {\n this.SourceDetailLoading = true;\n this.SourceDetailPage = 0;\n this.SourceDetailStatusFilter = 'All';\n this.ShowSourceDetail = true;\n this.cdr.detectChanges();\n\n try {\n const sourceItems = await this.loadContentItemsForSource(card.ID);\n const sourceRuns = await this.loadRunHistoryForSource(card.ID);\n\n const embeddingModelName = this.resolveEmbeddingModelName(card.EmbeddingModelID);\n const vectorIndexName = this.resolveVectorIndexName(card.VectorIndexID);\n const errorCount = sourceRuns.filter(r => r.StatusClass === 'failed').length;\n\n this.SelectedSource = {\n ID: card.ID,\n Name: card.Name,\n SourceTypeName: card.SourceTypeName,\n FileTypeName: card.FileTypeName,\n ContentTypeName: card.ContentTypeName,\n RequiresFileType: card.RequiresFileType,\n StatusClass: card.StatusClass,\n StatusLabel: card.StatusLabel,\n Icon: card.Icon,\n URL: card.URL,\n EmbeddingModelName: embeddingModelName,\n VectorIndexName: vectorIndexName,\n ItemCount: card.ItemCount,\n TagCount: card.TagCount,\n AvgTags: card.AvgTags,\n LastRunAgo: card.LastRunAgo,\n ErrorCount: errorCount,\n ContentItems: sourceItems,\n RunHistory: sourceRuns\n };\n } catch (error) {\n console.error('[Autotagging] Error loading source detail:', error);\n } finally {\n this.SourceDetailLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n public CloseSourceDetail(): void {\n this.ShowSourceDetail = false;\n this.SelectedSource = null;\n this.cdr.detectChanges();\n }\n\n public OpenContentItemDetail(item: ContentItemDetail): void {\n this.OpenContentItemRequested.emit(item);\n }\n\n public OpenEditSourceFromDetail(): void {\n if (!this.SelectedSource) return;\n const card = this.SourceCards.find(c => UUIDsEqual(c.ID, this.SelectedSource!.ID));\n if (card) {\n this.CloseSourceDetail();\n this.EditSourceRequested.emit(card);\n }\n }\n\n public RunSourceFromDetail(): void {\n if (!this.SelectedSource) return;\n const sourceID = this.SelectedSource.ID;\n this.CloseSourceDetail();\n this.RunSourceRequested.emit(sourceID);\n }\n\n public async DeleteSourceFromDetail(): Promise<void> {\n if (!this.SelectedSource) return;\n const card = this.SourceCards.find(c => UUIDsEqual(c.ID, this.SelectedSource!.ID));\n if (card) {\n this.CloseSourceDetail();\n await this.DeleteSource(card);\n }\n }\n\n // ── Source-detail filtering + pagination ──\n\n public get FilteredSourceDetailItems(): ContentItemDetail[] {\n if (!this.SelectedSource) return [];\n const items = this.SourceDetailStatusFilter === 'All'\n ? this.SelectedSource.ContentItems\n : this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === this.SourceDetailStatusFilter ||\n ci.TaggingStatus === this.SourceDetailStatusFilter\n );\n const start = this.SourceDetailPage * this.SourceDetailPageSize;\n return items.slice(start, start + this.SourceDetailPageSize);\n }\n\n public get FilteredSourceDetailTotal(): number {\n if (!this.SelectedSource) return 0;\n if (this.SourceDetailStatusFilter === 'All') return this.SelectedSource.ContentItems.length;\n return this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === this.SourceDetailStatusFilter ||\n ci.TaggingStatus === this.SourceDetailStatusFilter\n ).length;\n }\n\n public get SourceDetailTotalPages(): number {\n return Math.max(1, Math.ceil(this.FilteredSourceDetailTotal / this.SourceDetailPageSize));\n }\n\n public SourceDetailPrevPage(): void {\n if (this.SourceDetailPage > 0) {\n this.SourceDetailPage--;\n this.cdr.detectChanges();\n }\n }\n\n public SourceDetailNextPage(): void {\n if (this.SourceDetailPage < this.SourceDetailTotalPages - 1) {\n this.SourceDetailPage++;\n this.cdr.detectChanges();\n }\n }\n\n public OnSourceDetailStatusFilterChange(): void {\n this.SourceDetailPage = 0;\n this.cdr.detectChanges();\n }\n\n /**\n * Placeholder handler for retrying failed items in source detail. Surfaces a\n * notification; the pipeline re-processes failed items on the next run.\n */\n public RetryFailedItems(): void {\n if (!this.SelectedSource) return;\n const failedCount = this.SelectedSource.ContentItems.filter(\n ci => ci.EmbeddingStatus === 'Failed' || ci.TaggingStatus === 'Failed'\n ).length;\n if (failedCount === 0) {\n MJNotificationService.Instance.CreateSimpleNotification('No failed items to retry', 'info', 2500);\n return;\n }\n MJNotificationService.Instance.CreateSimpleNotification(\n `Retry queued for ${failedCount} failed item${failedCount > 1 ? 's' : ''}. Pipeline will re-process on next run.`,\n 'info',\n 3000\n );\n }\n\n private async loadContentItemsForSource(sourceId: string): Promise<ContentItemDetail[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView({\n EntityName: 'MJ: Content Items',\n ExtraFilter: `ContentSourceID='${sourceId}'`,\n OrderBy: '__mj_UpdatedAt DESC',\n MaxRows: 100,\n ResultType: 'simple'\n });\n\n if (!result.Success) return [];\n\n const tagsByItem = this.countTagsByItem();\n return result.Results.map(item => {\n const itemId = item['ID'] as string;\n const allTags = this.getAllWeightedTagsForItem(itemId);\n const tagCount = tagsByItem.get(itemId) ?? allTags.length;\n const contentSourceTypeID = (item['ContentSourceTypeID'] as string) ?? '';\n const itemStatuses = this.inferPipelineStatuses(item, tagCount);\n return {\n ID: itemId,\n Name: deriveDisplayName({ Name: item['Name'] as string | null, Description: item['Description'] as string | null }),\n SourceName: (item['ContentSource'] as string) ?? '',\n SourceTypeName: (item['ContentSourceType'] as string) ?? '',\n ContentTypeName: (item['ContentType'] as string) ?? '',\n FileTypeName: (item['ContentFileType'] as string) ?? '',\n URL: (item['URL'] as string) ?? '',\n TextContent: (item['Text'] as string) ?? '',\n Checksum: (item['Checksum'] as string) ?? '',\n Tags: allTags,\n CreatedAt: formatDate((item['__mj_CreatedAt'] as string) ?? ''),\n UpdatedAt: formatDate((item['__mj_UpdatedAt'] as string) ?? ''),\n ContentSourceID: sourceId,\n ContentSourceTypeID: contentSourceTypeID,\n StatusDot: tagCount > 0 ? 'complete' : 'processing',\n TagCount: tagCount,\n RequiresContentType: this.sourceTypeRequiresFileType(contentSourceTypeID),\n EntityRecordID: this.resolveEntityRecordID(item),\n EntityName: this.resolveEntityName(sourceId),\n EmbeddingStatus: itemStatuses.EmbeddingStatus,\n TaggingStatus: itemStatuses.TaggingStatus,\n };\n });\n }\n\n private async loadRunHistoryForSource(sourceId: string): Promise<RunHistoryRow[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView({\n EntityName: 'MJ: Content Process Runs',\n ExtraFilter: `SourceID='${sourceId}'`,\n OrderBy: 'StartTime DESC',\n MaxRows: 10,\n ResultType: 'simple'\n });\n\n if (!result.Success) return [];\n\n return result.Results.map(run => {\n const status = (run['Status'] as string) ?? 'Unknown';\n const startTime = run['StartTime'] as string | null;\n const endTime = run['EndTime'] as string | null;\n const duration = computeDuration(startTime, endTime);\n const processedItems = run['ProcessedItems'] as number | null;\n const errorCount = run['ErrorCount'] as number | null;\n const statusLower = status.toLowerCase();\n const isFailed = statusLower === 'error' || statusLower === 'failed';\n const isRunning = statusLower === 'running' || statusLower === 'processing';\n const hasErrors = (errorCount ?? 0) > 0;\n\n return {\n ID: run['ID'] as string,\n Status: displayStatus(status),\n StatusClass: isFailed ? 'failed' : isRunning ? 'running' : 'complete',\n SourceName: (run['Source'] as string) ?? 'Unknown',\n StartedDisplay: startTime ? formatDate(startTime) : '—',\n Duration: duration,\n Items: processedItems != null ? formatNumber(processedItems) : '—',\n Tags: '—',\n Errors: hasErrors ? formatNumber(errorCount!) : (isFailed ? status : '0'),\n ErrorClass: isFailed || hasErrors ? 'run-error-text' : ''\n };\n });\n }\n}\n","<mj-page-header-interior\n Title=\"Content Sources\"\n Subtitle=\"Configure where content is ingested from\">\n <div actions>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"Refresh()\" [disabled]=\"IsLoading\">\n @if (IsLoading) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> <span class=\"mj-action-label\">Refreshing…</span>\n } @else {\n <i class=\"fa-solid fa-arrows-rotate\"></i> <span class=\"mj-action-label\">Refresh</span>\n }\n </button>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"onAddSourceGuided()\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> <span class=\"mj-action-label\">Add Source (Guided)</span>\n </button>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"mj-action-label\">Add Source</span>\n </button>\n </div>\n</mj-page-header-interior>\n\n<mj-page-body-interior [Padding]=\"false\" [Flex]=\"true\">\n <div class=\"at-main-area\">\n @if (IsLoading) {\n <div class=\"at-loading-overlay\">\n <mj-loading text=\"Refreshing sources…\"></mj-loading>\n </div>\n }\n <div class=\"at-page-body\">\n @if (SourceCards.length === 0 && !IsLoading) {\n <div class=\"at-sources-empty\">\n <i class=\"fa-solid fa-database\"></i>\n <h3>No content sources yet</h3>\n <p>Use the guided setup to stand up your first source — pick an entity or URL, configure its document, taxonomy, and domain context in one flow.</p>\n <div class=\"at-sources-empty-actions\">\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddSourceGuided()\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> Add Source (Guided)\n </button>\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus\"></i> Add manually\n </button>\n </div>\n </div>\n }\n\n <div class=\"at-sources-grid\">\n @for (card of SourceCards; track card.ID) {\n <div class=\"at-source-card-full at-source-card-clickable\" (click)=\"OpenSourceDetail(card)\">\n <div class=\"at-source-card-header\">\n <div class=\"at-source-card-icon\"><i [class]=\"card.Icon\"></i></div>\n <div>\n <div class=\"at-source-card-title\">{{ card.Name }}</div>\n <div class=\"at-source-card-type\">{{ card.SourceTypeName }}@if (card.RequiresFileType) { · {{ card.FileTypeName }}}</div>\n </div>\n <div class=\"at-source-card-status\" [class]=\"card.StatusClass\">\n <div class=\"at-source-mini-status\" [class]=\"card.StatusClass\"></div>\n {{ card.StatusLabel }}\n </div>\n </div>\n @if (card.URL) {\n <div class=\"at-source-card-url\">{{ card.URL }}</div>\n }\n <div class=\"at-source-card-stats\">\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ formatNumber(card.ItemCount) }}</div>\n <div class=\"at-source-stat-label\">Items</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ formatNumber(card.TagCount) }}</div>\n <div class=\"at-source-stat-label\">Tags</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ card.AvgTags }}</div>\n <div class=\"at-source-stat-label\">Avg Tags</div>\n </div>\n <div class=\"at-source-stat\">\n <div class=\"at-source-stat-value\">{{ card.LastRunAgo }}</div>\n <div class=\"at-source-stat-label\">Last Run</div>\n </div>\n </div>\n <!-- Schedule indicator -->\n @if (card.ScheduledActionID) {\n <div class=\"at-schedule-indicator\" (click)=\"RemoveSchedule(card); $event.stopPropagation()\" title=\"Click to remove schedule\">\n <i class=\"fa-regular fa-clock\"></i>\n <span>{{ GetScheduleLabel(card) }}</span>\n </div>\n }\n <div class=\"at-source-card-actions\">\n <button class=\"at-source-action-btn\" (click)=\"onEditSource(card); $event.stopPropagation()\"><i class=\"fa-solid fa-pen\"></i> Edit</button>\n <button class=\"at-source-action-btn\" (click)=\"onRunSource(card.ID); $event.stopPropagation()\"><i class=\"fa-solid fa-play\"></i> Run</button>\n <button class=\"at-source-action-btn\" (click)=\"OpenDryRunPreview(card); $event.stopPropagation()\"><i class=\"fa-solid fa-flask\"></i> Preview</button>\n @if (!card.ScheduledActionID) {\n <button class=\"at-source-action-btn at-source-schedule-btn\" (click)=\"OpenScheduleDialog(card); $event.stopPropagation()\"><i class=\"fa-regular fa-clock\"></i> Schedule</button>\n }\n <button class=\"at-source-action-btn at-source-delete-btn\" (click)=\"DeleteSource(card); $event.stopPropagation()\"><i class=\"fa-solid fa-trash\"></i> Delete</button>\n </div>\n </div>\n }\n\n <!-- Add Source Card -->\n <div class=\"at-add-source-card\" (click)=\"onAddSource()\">\n <i class=\"fa-solid fa-plus-circle\"></i>\n <span style=\"font-size: 0.85rem; font-weight: 600;\">Add Content Source</span>\n <span style=\"font-size: 0.72rem;\">Web, RSS, Email, Files, API</span>\n </div>\n </div>\n </div>\n </div>\n</mj-page-body-interior>\n\n<!-- ══════ SOURCE DETAIL SLIDE-IN ══════ -->\n@if (ShowSourceDetail) {\n <div class=\"at-slide-overlay\" (click)=\"CloseSourceDetail()\"></div>\n <div class=\"at-slide-panel at-detail-panel\">\n <div class=\"at-slide-header\">\n <h3><i class=\"fa-solid fa-database\"></i> Source Detail</h3>\n <button class=\"at-slide-close\" aria-label=\"Close source detail\" (click)=\"CloseSourceDetail()\"><i class=\"fa-solid fa-times\"></i></button>\n </div>\n <div class=\"at-slide-body\">\n @if (SourceDetailLoading) {\n <div class=\"at-loading-overlay\">\n <mj-loading text=\"Loading source details...\"></mj-loading>\n </div>\n }\n @if (!SourceDetailLoading && SelectedSource) {\n <!-- Source Header -->\n <div class=\"at-detail-source-header\">\n <div class=\"at-source-card-icon\"><i [class]=\"SelectedSource.Icon\"></i></div>\n <div>\n <h4 class=\"at-detail-item-name\">{{ SelectedSource.Name }}</h4>\n <div class=\"at-detail-badges\">\n <span class=\"at-detail-badge at-detail-badge-type\">{{ SelectedSource.SourceTypeName }}</span>\n <span class=\"at-detail-badge\" [class]=\"'at-detail-badge-status-' + SelectedSource.StatusClass\">\n {{ SelectedSource.StatusLabel }}\n </span>\n </div>\n </div>\n </div>\n\n <!-- Configuration -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Configuration</div>\n <div class=\"at-detail-meta-grid\">\n @if (SelectedSource.URL) {\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">URL</span>\n <a [href]=\"SelectedSource.URL\" target=\"_blank\" class=\"at-detail-link at-detail-meta-value\">{{ SelectedSource.URL }}</a>\n </div>\n }\n @if (SelectedSource.RequiresFileType) {\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Content Type</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.ContentTypeName }}</span>\n </div>\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">File Type</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.FileTypeName }}</span>\n </div>\n }\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Embedding Model</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.EmbeddingModelName }}</span>\n </div>\n <div class=\"at-detail-meta-row\">\n <span class=\"at-detail-meta-key\">Vector Index</span>\n <span class=\"at-detail-meta-value\">{{ SelectedSource.VectorIndexName }}</span>\n </div>\n </div>\n </div>\n\n <!-- Stats -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Statistics</div>\n <div class=\"at-detail-stats-strip\">\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ formatNumber(SelectedSource.ItemCount) }}</div>\n <div class=\"at-detail-stat-label\">Items</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ formatNumber(SelectedSource.TagCount) }}</div>\n <div class=\"at-detail-stat-label\">Tags</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ SelectedSource.AvgTags }}</div>\n <div class=\"at-detail-stat-label\">Avg Tags</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\">{{ SelectedSource.LastRunAgo }}</div>\n <div class=\"at-detail-stat-label\">Last Run</div>\n </div>\n <div class=\"at-detail-stat\">\n <div class=\"at-detail-stat-value\" [class.at-kpi-error-value]=\"SelectedSource.ErrorCount > 0\">{{ SelectedSource.ErrorCount }}</div>\n <div class=\"at-detail-stat-label\">Errors</div>\n </div>\n </div>\n </div>\n\n <!-- Content Library (status badges, pagination) -->\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-header-row\">\n <div class=\"at-detail-section-label\">Content Library ({{ FilteredSourceDetailTotal }} of {{ SelectedSource.ItemCount | number }})</div>\n <div class=\"at-detail-section-controls\">\n <select class=\"at-detail-filter-select\" [(ngModel)]=\"SourceDetailStatusFilter\" (ngModelChange)=\"OnSourceDetailStatusFilterChange()\">\n @for (opt of SourceDetailStatusOptions; track opt) {\n <option [value]=\"opt\">{{ opt }}</option>\n }\n </select>\n <button class=\"at-action-btn at-retry-btn\" (click)=\"RetryFailedItems()\" title=\"Re-queue failed items for processing\">\n <i class=\"fa-solid fa-rotate-right\"></i> Retry Failed\n </button>\n </div>\n </div>\n <div class=\"at-detail-content-list\">\n @if (FilteredSourceDetailItems.length === 0) {\n <div class=\"at-empty-state\" style=\"padding: 16px;\">\n <p>{{ SourceDetailStatusFilter === 'All' ? 'No content items yet.' : 'No items match this filter.' }}</p>\n </div>\n }\n @for (ci of FilteredSourceDetailItems; track ci.ID) {\n <div class=\"at-detail-content-item\" (click)=\"OpenContentItemDetail(ci)\">\n <div class=\"at-feed-status-dot\" [class]=\"ci.StatusDot\"></div>\n <span class=\"at-detail-content-item-name\">{{ ci.Name }}</span>\n <span class=\"at-status-badge\" [class]=\"GetStatusBadgeClass(ci.EmbeddingStatus)\">E:{{ ci.EmbeddingStatus }}</span>\n <span class=\"at-status-badge\" [class]=\"GetStatusBadgeClass(ci.TaggingStatus)\">T:{{ ci.TaggingStatus }}</span>\n <span class=\"at-detail-content-item-tags\">{{ ci.TagCount }} tags</span>\n <span class=\"at-detail-content-item-time\">{{ ci.UpdatedAt }}</span>\n </div>\n }\n </div>\n <!-- Pagination -->\n @if (SourceDetailTotalPages > 1) {\n <div class=\"at-detail-pagination\">\n <button class=\"at-page-btn\" [disabled]=\"SourceDetailPage === 0\" (click)=\"SourceDetailPrevPage()\">\n <i class=\"fa-solid fa-chevron-left\"></i> Prev\n </button>\n <span class=\"at-page-info\">Page {{ SourceDetailPage + 1 }} of {{ SourceDetailTotalPages }}</span>\n <button class=\"at-page-btn\" [disabled]=\"SourceDetailPage >= SourceDetailTotalPages - 1\" (click)=\"SourceDetailNextPage()\">\n Next <i class=\"fa-solid fa-chevron-right\"></i>\n </button>\n </div>\n }\n </div>\n\n <!-- Run History -->\n @if (SelectedSource.RunHistory.length > 0) {\n <div class=\"at-detail-section\">\n <div class=\"at-detail-section-label\">Recent Runs</div>\n <div class=\"at-detail-run-history\">\n @for (run of SelectedSource.RunHistory; track run.ID) {\n <div class=\"at-detail-run-row\">\n <span class=\"at-run-status-badge\" [class]=\"run.StatusClass\">{{ run.Status }}</span>\n <span class=\"at-detail-run-time\">{{ run.StartedDisplay }}</span>\n <span class=\"at-detail-run-duration\">{{ run.Duration }}</span>\n <span class=\"at-detail-run-items\">{{ run.Items }} items</span>\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Actions -->\n <div class=\"at-detail-actions\">\n <button class=\"at-action-btn at-primary-btn\" (click)=\"OpenEditSourceFromDetail()\">\n <i class=\"fa-solid fa-pen\"></i> Edit\n </button>\n <button class=\"at-action-btn at-secondary-btn\" (click)=\"RunSourceFromDetail()\">\n <i class=\"fa-solid fa-play\"></i> Run Now\n </button>\n <button class=\"at-action-btn at-secondary-btn at-source-delete-btn\" (click)=\"DeleteSourceFromDetail()\">\n <i class=\"fa-solid fa-trash\"></i> Delete\n </button>\n </div>\n }\n </div>\n </div>\n}\n\n<!-- ══════ SCHEDULE DIALOG ══════ -->\n@if (ShowScheduleDialog && SchedulingSourceCard) {\n <div class=\"at-schedule-overlay\" (click)=\"CloseScheduleDialog()\">\n <div class=\"at-schedule-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"at-schedule-dialog-header\">\n <h3><i class=\"fa-regular fa-clock\"></i> Schedule Pipeline</h3>\n <button class=\"at-schedule-dialog-close\" (click)=\"CloseScheduleDialog()\" aria-label=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"at-schedule-dialog-body\">\n <div class=\"at-schedule-field\">\n <label>Source</label>\n <div class=\"at-schedule-source-name\">\n <i [class]=\"SchedulingSourceCard.Icon\"></i>\n {{ SchedulingSourceCard.Name }}\n </div>\n </div>\n <div class=\"at-schedule-field\">\n <label>Action</label>\n <div class=\"at-schedule-action-name\">Autotag and Vectorize Content</div>\n </div>\n <div class=\"at-schedule-field\">\n <label for=\"schedule-cron\">Cron Expression</label>\n <input id=\"schedule-cron\"\n type=\"text\"\n class=\"mj-input at-schedule-cron-input\"\n [(ngModel)]=\"ScheduleCron\"\n placeholder=\"0 2 * * *\" />\n <div class=\"at-schedule-cron-preview\">\n <i class=\"fa-solid fa-info-circle\"></i>\n {{ GetCronPreview(ScheduleCron) }}\n </div>\n </div>\n <div class=\"at-schedule-field at-schedule-toggle-row\">\n <label for=\"schedule-enabled\">Enabled</label>\n <input id=\"schedule-enabled\"\n type=\"checkbox\"\n class=\"mj-checkbox\"\n [(ngModel)]=\"ScheduleEnabled\" />\n </div>\n </div>\n <div class=\"at-schedule-dialog-footer\">\n <button class=\"at-action-btn at-primary-btn\" (click)=\"SaveSchedule()\" [disabled]=\"ScheduleSaving\">\n @if (ScheduleSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Saving...\n } @else {\n <i class=\"fa-solid fa-check\"></i> Create Schedule\n }\n </button>\n <button class=\"at-action-btn at-secondary-btn\" (click)=\"CloseScheduleDialog()\">Cancel</button>\n </div>\n </div>\n </div>\n}\n\n<!-- ══════ DRY-RUN DISPOSITION PREVIEW (in-memory, nothing persisted) ══════ -->\n<classify-dry-run-preview\n [Provider]=\"Provider\"\n [Show]=\"ShowDryRunPreview\"\n [SourceCard]=\"DryRunSourceCard\"\n (Closed)=\"CloseDryRunPreview()\">\n</classify-dry-run-preview>\n"]}
|