@mastra/playground-ui 48.0.0 → 48.1.0-alpha.1
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/CHANGELOG.md +51 -0
- package/dist/Composer.css +2 -2
- package/dist/{code-C5KVVzOZ.js → code-Cj09LVys.js} +2 -2
- package/dist/{code-C5KVVzOZ.js.map → code-Cj09LVys.js.map} +1 -1
- package/dist/{code-B3WONxnA.cjs → code-FZwLnf_f.cjs} +2 -2
- package/dist/{code-B3WONxnA.cjs.map → code-FZwLnf_f.cjs.map} +1 -1
- package/dist/code-block-Dn0K3DkE.cjs +88 -0
- package/dist/code-block-Dn0K3DkE.cjs.map +1 -0
- package/dist/code-block-DqKXZajq.js +86 -0
- package/dist/code-block-DqKXZajq.js.map +1 -0
- package/dist/components/Code.cjs.js +1 -1
- package/dist/components/Code.es.js +1 -1
- package/dist/components/CodeBlock.cjs.js +3 -83
- package/dist/components/CodeBlock.cjs.js.map +1 -1
- package/dist/components/CodeBlock.es.js +1 -85
- package/dist/components/CodeBlock.es.js.map +1 -1
- package/dist/components/CodeEditor.cjs.js +2 -2
- package/dist/components/CodeEditor.es.js +2 -2
- package/dist/components/CopyButton.cjs.js +1 -1
- package/dist/components/CopyButton.es.js +1 -1
- package/dist/components/DataCodeSection.cjs.js +1 -1
- package/dist/components/DataCodeSection.es.js +1 -1
- package/dist/components/DataDetailsPanel.cjs.js +1 -1
- package/dist/components/DataDetailsPanel.es.js +1 -1
- package/dist/components/DataPanel.cjs.js +1 -1
- package/dist/components/DataPanel.es.js +1 -1
- package/dist/components/MarkdownRenderer.cjs.js +1 -1
- package/dist/components/MarkdownRenderer.es.js +1 -1
- package/dist/components/SideDialog.cjs.js +1 -1
- package/dist/components/SideDialog.es.js +1 -1
- package/dist/components/Truncate.cjs.js +1 -1
- package/dist/components/Truncate.es.js +1 -1
- package/dist/components/ai/plan.cjs.js +2 -2
- package/dist/components/ai/plan.cjs.js.map +1 -1
- package/dist/components/ai/plan.es.js +2 -2
- package/dist/components/ai/plan.es.js.map +1 -1
- package/dist/components/ai/task-list.cjs.js +44 -18
- package/dist/components/ai/task-list.cjs.js.map +1 -1
- package/dist/components/ai/task-list.es.js +47 -21
- package/dist/components/ai/task-list.es.js.map +1 -1
- package/dist/{copy-button-B1GWIQ-x.js → copy-button-BLGUkVE8.js} +4 -2
- package/dist/copy-button-BLGUkVE8.js.map +1 -0
- package/dist/{copy-button-DwZ3c7D4.cjs → copy-button-BfawWA4t.cjs} +4 -2
- package/dist/copy-button-BfawWA4t.cjs.map +1 -0
- package/dist/{data-code-section-PJM5l3aS.js → data-code-section-DHbytoQ2.js} +2 -2
- package/dist/{data-code-section-PJM5l3aS.js.map → data-code-section-DHbytoQ2.js.map} +1 -1
- package/dist/{data-code-section-BjmFgJpC.cjs → data-code-section-bqvIovEN.cjs} +2 -2
- package/dist/{data-code-section-BjmFgJpC.cjs.map → data-code-section-bqvIovEN.cjs.map} +1 -1
- package/dist/{data-panel-BQqPr6ew.js → data-panel-BX_78wCj.js} +2 -2
- package/dist/{data-panel-BQqPr6ew.js.map → data-panel-BX_78wCj.js.map} +1 -1
- package/dist/{data-panel-C85h9XvH.cjs → data-panel-DT6LgTVX.cjs} +2 -2
- package/dist/{data-panel-C85h9XvH.cjs.map → data-panel-DT6LgTVX.cjs.map} +1 -1
- package/dist/domains/logs/components/log-details-view.cjs.js +1 -1
- package/dist/domains/logs/components/log-details-view.es.js +1 -1
- package/dist/domains/traces/components/span-data-panel-view.cjs.js +1 -1
- package/dist/domains/traces/components/span-data-panel-view.es.js +1 -1
- package/dist/domains/traces/components/trace-data-panel-view.cjs.js +1 -1
- package/dist/domains/traces/components/trace-data-panel-view.es.js +1 -1
- package/dist/ee/signals/entity-learning-api.cjs.js +8 -2
- package/dist/ee/signals/entity-learning-api.cjs.js.map +1 -1
- package/dist/ee/signals/entity-learning-api.es.js +8 -3
- package/dist/ee/signals/entity-learning-api.es.js.map +1 -1
- package/dist/ee/signals/hooks/use-noise-examples.cjs.js +5 -3
- package/dist/ee/signals/hooks/use-noise-examples.cjs.js.map +1 -1
- package/dist/ee/signals/hooks/use-noise-examples.es.js +6 -4
- package/dist/ee/signals/hooks/use-noise-examples.es.js.map +1 -1
- package/dist/ee/signals/hooks/use-theme-examples.cjs.js +6 -3
- package/dist/ee/signals/hooks/use-theme-examples.cjs.js.map +1 -1
- package/dist/ee/signals/hooks/use-theme-examples.es.js +7 -4
- package/dist/ee/signals/hooks/use-theme-examples.es.js.map +1 -1
- package/dist/ee/signals/hooks/use-theme-paths.cjs.js +2 -2
- package/dist/ee/signals/hooks/use-theme-paths.cjs.js.map +1 -1
- package/dist/ee/signals/hooks/use-theme-paths.es.js +3 -3
- package/dist/ee/signals/hooks/use-theme-paths.es.js.map +1 -1
- package/dist/ee/signals/lifeline-row.cjs.js +1 -1
- package/dist/ee/signals/lifeline-row.cjs.js.map +1 -1
- package/dist/ee/signals/lifeline-row.es.js +1 -1
- package/dist/ee/signals/lifeline-row.es.js.map +1 -1
- package/dist/ee/signals/noise-detail-panel.cjs.js +18 -5
- package/dist/ee/signals/noise-detail-panel.cjs.js.map +1 -1
- package/dist/ee/signals/noise-detail-panel.es.js +18 -5
- package/dist/ee/signals/noise-detail-panel.es.js.map +1 -1
- package/dist/ee/signals/sankey-signals.cjs.js +50 -34
- package/dist/ee/signals/sankey-signals.cjs.js.map +1 -1
- package/dist/ee/signals/sankey-signals.es.js +52 -36
- package/dist/ee/signals/sankey-signals.es.js.map +1 -1
- package/dist/ee/signals/signal-delta-column.cjs.js +1 -1
- package/dist/ee/signals/signal-delta-column.cjs.js.map +1 -1
- package/dist/ee/signals/signal-delta-column.es.js +1 -1
- package/dist/ee/signals/signal-delta-column.es.js.map +1 -1
- package/dist/ee/signals/theme-detail-panel.cjs.js +11 -4
- package/dist/ee/signals/theme-detail-panel.cjs.js.map +1 -1
- package/dist/ee/signals/theme-detail-panel.es.js +11 -4
- package/dist/ee/signals/theme-detail-panel.es.js.map +1 -1
- package/dist/ee/signals/theme-drilldown-data.cjs.js +41 -13
- package/dist/ee/signals/theme-drilldown-data.cjs.js.map +1 -1
- package/dist/ee/signals/theme-drilldown-data.es.js +40 -14
- package/dist/ee/signals/theme-drilldown-data.es.js.map +1 -1
- package/dist/ee/signals/theme-filter-banner.cjs.js +53 -28
- package/dist/ee/signals/theme-filter-banner.cjs.js.map +1 -1
- package/dist/ee/signals/theme-filter-banner.es.js +53 -28
- package/dist/ee/signals/theme-filter-banner.es.js.map +1 -1
- package/dist/{highlight-C2uRVhiA.cjs → highlight-CEt2vhD8.cjs} +20 -3
- package/dist/highlight-CEt2vhD8.cjs.map +1 -0
- package/dist/{highlight-Dis62bkj.js → highlight-CSJjjoqh.js} +20 -3
- package/dist/highlight-CSJjjoqh.js.map +1 -0
- package/dist/markdown-renderer-D1vSFfp9.cjs +86 -0
- package/dist/markdown-renderer-D1vSFfp9.cjs.map +1 -0
- package/dist/markdown-renderer-DmYYQHxu.js +84 -0
- package/dist/markdown-renderer-DmYYQHxu.js.map +1 -0
- package/dist/markdown-renderer.css +182 -0
- package/dist/src/ds/components/CopyButton/copy-button.d.ts +2 -1
- package/dist/src/ds/components/MarkdownRenderer/markdown-renderer.d.ts +9 -5
- package/dist/src/ds/components/ai/task-list/task-list.d.ts +4 -2
- package/dist/src/ds/components/ai/task-list/task-list.stories.d.ts +2 -0
- package/dist/src/ee/signals/entity-learning-api.d.ts +4 -2
- package/dist/src/ee/signals/hooks/use-noise-examples.d.ts +2 -1
- package/dist/src/ee/signals/hooks/use-theme-examples.d.ts +2 -1
- package/dist/src/ee/signals/hooks/use-theme-paths.d.ts +1 -1
- package/dist/src/ee/signals/noise-detail-panel.d.ts +4 -1
- package/dist/src/ee/signals/theme-detail-panel.d.ts +5 -3
- package/dist/src/ee/signals/theme-drilldown-data.d.ts +17 -4
- package/dist/src/ee/signals/theme-filter-banner.d.ts +5 -3
- package/dist/style.css +5 -98
- package/package.json +7 -7
- package/dist/copy-button-B1GWIQ-x.js.map +0 -1
- package/dist/copy-button-DwZ3c7D4.cjs.map +0 -1
- package/dist/highlight-C2uRVhiA.cjs.map +0 -1
- package/dist/highlight-Dis62bkj.js.map +0 -1
- package/dist/markdown-renderer-DszxuuNM.js +0 -117
- package/dist/markdown-renderer-DszxuuNM.js.map +0 -1
- package/dist/markdown-renderer-g8xNLOc0.cjs +0 -119
- package/dist/markdown-renderer-g8xNLOc0.cjs.map +0 -1
|
@@ -8,7 +8,7 @@ import { TraceKeysAndValues } from './trace-keys-and-values.es.js';
|
|
|
8
8
|
import { TraceTimeline } from './trace-timeline.es.js';
|
|
9
9
|
import { B as Button } from '../../../Button-C-9Pzy-Z.js';
|
|
10
10
|
import { B as ButtonsGroup } from '../../../buttons-group-DJh4wnMs.js';
|
|
11
|
-
import { D as DataPanel } from '../../../data-panel-
|
|
11
|
+
import { D as DataPanel } from '../../../data-panel-BX_78wCj.js';
|
|
12
12
|
import { N as Notice } from '../../../Notice-DWHQgxkA.js';
|
|
13
13
|
import { Icon } from '../../../icons/Icon.es.js';
|
|
14
14
|
import { truncateString } from '../../../utils/truncate-string.es.js';
|
|
@@ -38,7 +38,10 @@ function fetchThemeDetail(request, entityId, entityType, signalName, snapshotId,
|
|
|
38
38
|
const query = new URLSearchParams({ entityType, signalName, snapshotId });
|
|
39
39
|
return request(themePath(entityId, themeId, `?${query}`));
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function serializeThemeFilters(filters) {
|
|
42
|
+
return filters.map((filter) => `${filter.signalName}:${filter.kind === "theme" ? filter.themeId : "noise"}`).join(",");
|
|
43
|
+
}
|
|
44
|
+
function fetchThemeExamples(request, entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0, filters = []) {
|
|
42
45
|
const query = new URLSearchParams({
|
|
43
46
|
entityType,
|
|
44
47
|
signalName,
|
|
@@ -46,6 +49,7 @@ function fetchThemeExamples(request, entityId, entityType, signalName, snapshotI
|
|
|
46
49
|
limit: String(limit),
|
|
47
50
|
offset: String(offset)
|
|
48
51
|
});
|
|
52
|
+
if (filters.length > 0) query.set("filterThemes", serializeThemeFilters(filters));
|
|
49
53
|
return request(themePath(entityId, themeId, `/examples?${query}`));
|
|
50
54
|
}
|
|
51
55
|
function fetchThemeHistory(request, entityId, entityType, signalName, themeId, limit = 100) {
|
|
@@ -56,7 +60,7 @@ function fetchNoise(request, entityId, entityType, signalName, snapshotId) {
|
|
|
56
60
|
const query = new URLSearchParams({ entityType, signalName, snapshotId });
|
|
57
61
|
return request(noisePath(entityId, `?${query}`));
|
|
58
62
|
}
|
|
59
|
-
function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit = 20, offset = 0) {
|
|
63
|
+
function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit = 20, offset = 0, filters = []) {
|
|
60
64
|
const query = new URLSearchParams({
|
|
61
65
|
entityType,
|
|
62
66
|
signalName,
|
|
@@ -64,6 +68,7 @@ function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotI
|
|
|
64
68
|
limit: String(limit),
|
|
65
69
|
offset: String(offset)
|
|
66
70
|
});
|
|
71
|
+
if (filters.length > 0) query.set("filterThemes", serializeThemeFilters(filters));
|
|
67
72
|
return request(noisePath(entityId, `/examples?${query}`));
|
|
68
73
|
}
|
|
69
74
|
async function fetchThemePaths(request, entityId, entityType, signalNames, snapshotId) {
|
|
@@ -110,4 +115,5 @@ exports.fetchThemeHistory = fetchThemeHistory;
|
|
|
110
115
|
exports.fetchThemePaths = fetchThemePaths;
|
|
111
116
|
exports.fetchThemeSnapshots = fetchThemeSnapshots;
|
|
112
117
|
exports.fetchTraceInsight = fetchTraceInsight;
|
|
118
|
+
exports.serializeThemeFilters = serializeThemeFilters;
|
|
113
119
|
//# sourceMappingURL=entity-learning-api.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-learning-api.cjs.js","sources":["../../../src/ee/signals/entity-learning-api.ts"],"sourcesContent":["import type { TraceIntelligenceRequest } from './trace-intelligence-context';\nimport type {\n NoiseExamplesResponse,\n NoiseResponse,\n ThemeDetailResponse,\n EntityLearningProgressResponse,\n ThemeEntitiesResponse,\n ThemeExamplesResponse,\n ThemeFlowResponse,\n ThemeHistoryResponse,\n ThemePathsResponse,\n ThemeSnapshotsResponse,\n TraceInsightResponse,\n TraceSignalName,\n} from './types';\n\nexport function fetchThemeEntities(request: TraceIntelligenceRequest, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<ThemeEntitiesResponse>(`/api/learning/entities?${query}`);\n}\n\nexport function fetchEntityLearningProgress(request: TraceIntelligenceRequest, entityId: string, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<EntityLearningProgressResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/progress?${query}`,\n );\n}\n\nexport function fetchThemeSnapshots(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n dateFrom?: Date,\n dateTo?: Date,\n limit = 24,\n) {\n // Landmarks presentation returns a bounded, time-balanced selection over the\n // whole range instead of the newest-first inventory page.\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n presentation: 'landmarks',\n limit: String(limit),\n });\n if (dateFrom) query.set('from', dateFrom.toISOString());\n if (dateTo) query.set('to', dateTo.toISOString());\n return request<ThemeSnapshotsResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/theme-snapshots?${query}`,\n );\n}\n\nexport function fetchThemeFlow(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n snapshotId: string,\n themeLimitPerStage = 8,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n themeLimitPerStage: String(themeLimitPerStage),\n });\n return request<ThemeFlowResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-flow?${query}`);\n}\n\nexport function fetchThemeDetail(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<ThemeDetailResponse>(themePath(entityId, themeId, `?${query}`));\n}\n\nexport function fetchThemeExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n limit = 20,\n offset = 0,\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n return request<ThemeExamplesResponse>(themePath(entityId, themeId, `/examples?${query}`));\n}\n\nexport function fetchThemeHistory(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n themeId: string,\n limit = 100,\n) {\n const query = new URLSearchParams({ entityType, signalName, limit: String(limit) });\n return request<ThemeHistoryResponse>(themePath(entityId, themeId, `/history?${query}`));\n}\n\nexport function fetchNoise(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<NoiseResponse>(noisePath(entityId, `?${query}`));\n}\n\nexport function fetchNoiseExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n limit = 20,\n offset = 0,\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n return request<NoiseExamplesResponse>(noisePath(entityId, `/examples?${query}`));\n}\n\nexport async function fetchThemePaths(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n): Promise<ThemePathsResponse> {\n const firstPage = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, 0);\n const paths = [...firstPage.paths];\n const themes = { ...firstPage.themes };\n let nextOffset = firstPage.nextOffset;\n\n while (nextOffset !== undefined) {\n const page = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, nextOffset);\n paths.push(...page.paths);\n Object.assign(themes, page.themes);\n nextOffset = page.nextOffset;\n }\n\n return { snapshot: firstPage.snapshot, signals: firstPage.signals, themes, paths };\n}\n\nfunction fetchThemePathsPage(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n offset: number,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n limit: '500',\n offset: String(offset),\n });\n return request<ThemePathsResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-paths?${query}`);\n}\n\nexport function fetchTraceInsight(request: TraceIntelligenceRequest, traceId: string) {\n return request<TraceInsightResponse>(`/api/learning/traces/${encodeURIComponent(traceId)}/summary`);\n}\n\nfunction themePath(entityId: string, themeId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/themes/${encodeURIComponent(themeId)}${suffix}`;\n}\n\nfunction noisePath(entityId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/noise${suffix}`;\n}\n"],"names":[],"mappings":";;;;AAgBO,SAAS,kBAAA,CAAmB,SAAmC,UAAA,EAAoB;AACxF,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA,CAA+B,CAAA,uBAAA,EAA0B,KAAK,CAAA,CAAE,CAAA;AACzE;AAEO,SAAS,2BAAA,CAA4B,OAAA,EAAmC,QAAA,EAAkB,UAAA,EAAoB;AACnH,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA;AAAA,IACL,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,aAAa,KAAK,CAAA;AAAA,GAC1E;AACF;AAEO,SAAS,mBAAA,CACd,SACA,QAAA,EACA,UAAA,EACA,aACA,QAAA,EACA,MAAA,EACA,QAAQ,EAAA,EACR;AAGA,EAAA,MAAM,K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AA4B,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,CAAA,aAAA,EAAgB,KAAK,CAAA,CAAE,CAAA;AAClH;AAEO,SAAS,iBAAA,CAAkB,SAAmC,OAAA,EAAiB;AACpF,EAAA,OAAO,OAAA,CAA8B,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,OAAO,CAAC,CAAA,QAAA,CAAU,CAAA;AACpG;AAEA,SAAS,SAAA,CAAU,QAAA,EAAkB,OAAA,EAAiB,MAAA,EAAgB;AACpE,EAAA,OAAO,CAAA,uBAAA,EAA0B,mBAAmB,QAAQ,CAAC,WAAW,kBAAA,CAAmB,OAAO,CAAC,CAAA,EAAG,MAAM,CAAA,CAAA;AAC9G;AAEA,SAAS,SAAA,CAAU,UAAkB,MAAA,EAAgB;AACnD,EAAA,OAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,SAAS,MAAM,CAAA,CAAA;AAC9E;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"entity-learning-api.cjs.js","sources":["../../../src/ee/signals/entity-learning-api.ts"],"sourcesContent":["import type { ThemeSelection } from './theme-drilldown-data';\nimport type { TraceIntelligenceRequest } from './trace-intelligence-context';\nimport type {\n NoiseExamplesResponse,\n NoiseResponse,\n ThemeDetailResponse,\n EntityLearningProgressResponse,\n ThemeEntitiesResponse,\n ThemeExamplesResponse,\n ThemeFlowResponse,\n ThemeHistoryResponse,\n ThemePathsResponse,\n ThemeSnapshotsResponse,\n TraceInsightResponse,\n TraceSignalName,\n} from './types';\n\nexport function fetchThemeEntities(request: TraceIntelligenceRequest, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<ThemeEntitiesResponse>(`/api/learning/entities?${query}`);\n}\n\nexport function fetchEntityLearningProgress(request: TraceIntelligenceRequest, entityId: string, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<EntityLearningProgressResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/progress?${query}`,\n );\n}\n\nexport function fetchThemeSnapshots(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n dateFrom?: Date,\n dateTo?: Date,\n limit = 24,\n) {\n // Landmarks presentation returns a bounded, time-balanced selection over the\n // whole range instead of the newest-first inventory page.\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n presentation: 'landmarks',\n limit: String(limit),\n });\n if (dateFrom) query.set('from', dateFrom.toISOString());\n if (dateTo) query.set('to', dateTo.toISOString());\n return request<ThemeSnapshotsResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/theme-snapshots?${query}`,\n );\n}\n\nexport function fetchThemeFlow(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n snapshotId: string,\n themeLimitPerStage = 8,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n themeLimitPerStage: String(themeLimitPerStage),\n });\n return request<ThemeFlowResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-flow?${query}`);\n}\n\nexport function fetchThemeDetail(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<ThemeDetailResponse>(themePath(entityId, themeId, `?${query}`));\n}\n\nexport function serializeThemeFilters(filters: ThemeSelection[]) {\n return filters.map(filter => `${filter.signalName}:${filter.kind === 'theme' ? filter.themeId : 'noise'}`).join(',');\n}\n\nexport function fetchThemeExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n limit = 20,\n offset = 0,\n filters: ThemeSelection[] = [],\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n if (filters.length > 0) query.set('filterThemes', serializeThemeFilters(filters));\n return request<ThemeExamplesResponse>(themePath(entityId, themeId, `/examples?${query}`));\n}\n\nexport function fetchThemeHistory(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n themeId: string,\n limit = 100,\n) {\n const query = new URLSearchParams({ entityType, signalName, limit: String(limit) });\n return request<ThemeHistoryResponse>(themePath(entityId, themeId, `/history?${query}`));\n}\n\nexport function fetchNoise(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<NoiseResponse>(noisePath(entityId, `?${query}`));\n}\n\nexport function fetchNoiseExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n limit = 20,\n offset = 0,\n filters: ThemeSelection[] = [],\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n if (filters.length > 0) query.set('filterThemes', serializeThemeFilters(filters));\n return request<NoiseExamplesResponse>(noisePath(entityId, `/examples?${query}`));\n}\n\nexport async function fetchThemePaths(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n): Promise<ThemePathsResponse> {\n const firstPage = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, 0);\n const paths = [...firstPage.paths];\n const themes = { ...firstPage.themes };\n let nextOffset = firstPage.nextOffset;\n\n while (nextOffset !== undefined) {\n const page = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, nextOffset);\n paths.push(...page.paths);\n Object.assign(themes, page.themes);\n nextOffset = page.nextOffset;\n }\n\n return { snapshot: firstPage.snapshot, signals: firstPage.signals, themes, paths };\n}\n\nfunction fetchThemePathsPage(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n offset: number,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n limit: '500',\n offset: String(offset),\n });\n return request<ThemePathsResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-paths?${query}`);\n}\n\nexport function fetchTraceInsight(request: TraceIntelligenceRequest, traceId: string) {\n return request<TraceInsightResponse>(`/api/learning/traces/${encodeURIComponent(traceId)}/summary`);\n}\n\nfunction themePath(entityId: string, themeId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/themes/${encodeURIComponent(themeId)}${suffix}`;\n}\n\nfunction noisePath(entityId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/noise${suffix}`;\n}\n"],"names":[],"mappings":";;;;AAiBO,SAAS,kBAAA,CAAmB,SAAmC,UAAA,EAAoB;AACxF,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA,CAA+B,CAAA,uBAAA,EAA0B,KAAK,CAAA,CAAE,CAAA;AACzE;AAEO,SAAS,2BAAA,CAA4B,OAAA,EAAmC,QAAA,EAAkB,UAAA,EAAoB;AACnH,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA;AAAA,IACL,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,aAAa,KAAK,CAAA;AAAA,GAC1E;AACF;AAEO,SAAS,mBAAA,CACd,SACA,QAAA,EACA,UAAA,EACA,aACA,QAAA,EACA,MAAA,EACA,QAAQ,EAAA,EACR;AAGA,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB;AAAA,IAChC,UAAA;AAAA,IACA,WAAA,EAAa,WAAA,CAAY,IAAA,CAAK,GAAG,CAAA;AAAA,IACjC,YAAA,EAAc,WAAA;AAAA,IACd,KAAA,EAAO,OAAO,KAAK;AAAA,GACpB,CAAA;AACD,EAAA,IAAI,UAAU,KAAA,CAAM,GAAA,CAAI,MAAA,EAAQ,QA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A,EACA,UAAA,EACA,WAAA,EACA,YACA,MAAA,EACA;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB;AAAA,IAChC,UAAA;AAAA,IACA,WAAA,EAAa,WAAA,CAAY,IAAA,CAAK,GAAG,CAAA;AAAA,IACjC,UAAA;AAAA,IACA,KAAA,EAAO,KAAA;AAAA,IACP,MAAA,EAAQ,OAAO,MAAM;AAAA,GACtB,CAAA;AACD,EAAA,OAAO,QAA4B,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,CAAA,aAAA,EAAgB,KAAK,CAAA,CAAE,CAAA;AAClH;AAEO,SAAS,iBAAA,CAAkB,SAAmC,OAAA,EAAiB;AACpF,EAAA,OAAO,OAAA,CAA8B,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,OAAO,CAAC,CAAA,QAAA,CAAU,CAAA;AACpG;AAEA,SAAS,SAAA,CAAU,QAAA,EAAkB,OAAA,EAAiB,MAAA,EAAgB;AACpE,EAAA,OAAO,CAAA,uBAAA,EAA0B,mBAAmB,QAAQ,CAAC,WAAW,kBAAA,CAAmB,OAAO,CAAC,CAAA,EAAG,MAAM,CAAA,CAAA;AAC9G;AAEA,SAAS,SAAA,CAAU,UAAkB,MAAA,EAAgB;AACnD,EAAA,OAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,SAAS,MAAM,CAAA,CAAA;AAC9E;;;;;;;;;;;;;;;"}
|
|
@@ -34,7 +34,10 @@ function fetchThemeDetail(request, entityId, entityType, signalName, snapshotId,
|
|
|
34
34
|
const query = new URLSearchParams({ entityType, signalName, snapshotId });
|
|
35
35
|
return request(themePath(entityId, themeId, `?${query}`));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function serializeThemeFilters(filters) {
|
|
38
|
+
return filters.map((filter) => `${filter.signalName}:${filter.kind === "theme" ? filter.themeId : "noise"}`).join(",");
|
|
39
|
+
}
|
|
40
|
+
function fetchThemeExamples(request, entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0, filters = []) {
|
|
38
41
|
const query = new URLSearchParams({
|
|
39
42
|
entityType,
|
|
40
43
|
signalName,
|
|
@@ -42,6 +45,7 @@ function fetchThemeExamples(request, entityId, entityType, signalName, snapshotI
|
|
|
42
45
|
limit: String(limit),
|
|
43
46
|
offset: String(offset)
|
|
44
47
|
});
|
|
48
|
+
if (filters.length > 0) query.set("filterThemes", serializeThemeFilters(filters));
|
|
45
49
|
return request(themePath(entityId, themeId, `/examples?${query}`));
|
|
46
50
|
}
|
|
47
51
|
function fetchThemeHistory(request, entityId, entityType, signalName, themeId, limit = 100) {
|
|
@@ -52,7 +56,7 @@ function fetchNoise(request, entityId, entityType, signalName, snapshotId) {
|
|
|
52
56
|
const query = new URLSearchParams({ entityType, signalName, snapshotId });
|
|
53
57
|
return request(noisePath(entityId, `?${query}`));
|
|
54
58
|
}
|
|
55
|
-
function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit = 20, offset = 0) {
|
|
59
|
+
function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit = 20, offset = 0, filters = []) {
|
|
56
60
|
const query = new URLSearchParams({
|
|
57
61
|
entityType,
|
|
58
62
|
signalName,
|
|
@@ -60,6 +64,7 @@ function fetchNoiseExamples(request, entityId, entityType, signalName, snapshotI
|
|
|
60
64
|
limit: String(limit),
|
|
61
65
|
offset: String(offset)
|
|
62
66
|
});
|
|
67
|
+
if (filters.length > 0) query.set("filterThemes", serializeThemeFilters(filters));
|
|
63
68
|
return request(noisePath(entityId, `/examples?${query}`));
|
|
64
69
|
}
|
|
65
70
|
async function fetchThemePaths(request, entityId, entityType, signalNames, snapshotId) {
|
|
@@ -95,5 +100,5 @@ function noisePath(entityId, suffix) {
|
|
|
95
100
|
return `/api/learning/entities/${encodeURIComponent(entityId)}/noise${suffix}`;
|
|
96
101
|
}
|
|
97
102
|
|
|
98
|
-
export { fetchEntityLearningProgress, fetchNoise, fetchNoiseExamples, fetchThemeDetail, fetchThemeEntities, fetchThemeExamples, fetchThemeFlow, fetchThemeHistory, fetchThemePaths, fetchThemeSnapshots, fetchTraceInsight };
|
|
103
|
+
export { fetchEntityLearningProgress, fetchNoise, fetchNoiseExamples, fetchThemeDetail, fetchThemeEntities, fetchThemeExamples, fetchThemeFlow, fetchThemeHistory, fetchThemePaths, fetchThemeSnapshots, fetchTraceInsight, serializeThemeFilters };
|
|
99
104
|
//# sourceMappingURL=entity-learning-api.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-learning-api.es.js","sources":["../../../src/ee/signals/entity-learning-api.ts"],"sourcesContent":["import type { TraceIntelligenceRequest } from './trace-intelligence-context';\nimport type {\n NoiseExamplesResponse,\n NoiseResponse,\n ThemeDetailResponse,\n EntityLearningProgressResponse,\n ThemeEntitiesResponse,\n ThemeExamplesResponse,\n ThemeFlowResponse,\n ThemeHistoryResponse,\n ThemePathsResponse,\n ThemeSnapshotsResponse,\n TraceInsightResponse,\n TraceSignalName,\n} from './types';\n\nexport function fetchThemeEntities(request: TraceIntelligenceRequest, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<ThemeEntitiesResponse>(`/api/learning/entities?${query}`);\n}\n\nexport function fetchEntityLearningProgress(request: TraceIntelligenceRequest, entityId: string, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<EntityLearningProgressResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/progress?${query}`,\n );\n}\n\nexport function fetchThemeSnapshots(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n dateFrom?: Date,\n dateTo?: Date,\n limit = 24,\n) {\n // Landmarks presentation returns a bounded, time-balanced selection over the\n // whole range instead of the newest-first inventory page.\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n presentation: 'landmarks',\n limit: String(limit),\n });\n if (dateFrom) query.set('from', dateFrom.toISOString());\n if (dateTo) query.set('to', dateTo.toISOString());\n return request<ThemeSnapshotsResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/theme-snapshots?${query}`,\n );\n}\n\nexport function fetchThemeFlow(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n snapshotId: string,\n themeLimitPerStage = 8,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n themeLimitPerStage: String(themeLimitPerStage),\n });\n return request<ThemeFlowResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-flow?${query}`);\n}\n\nexport function fetchThemeDetail(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<ThemeDetailResponse>(themePath(entityId, themeId, `?${query}`));\n}\n\nexport function fetchThemeExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n limit = 20,\n offset = 0,\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n return request<ThemeExamplesResponse>(themePath(entityId, themeId, `/examples?${query}`));\n}\n\nexport function fetchThemeHistory(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n themeId: string,\n limit = 100,\n) {\n const query = new URLSearchParams({ entityType, signalName, limit: String(limit) });\n return request<ThemeHistoryResponse>(themePath(entityId, themeId, `/history?${query}`));\n}\n\nexport function fetchNoise(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<NoiseResponse>(noisePath(entityId, `?${query}`));\n}\n\nexport function fetchNoiseExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n limit = 20,\n offset = 0,\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n return request<NoiseExamplesResponse>(noisePath(entityId, `/examples?${query}`));\n}\n\nexport async function fetchThemePaths(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n): Promise<ThemePathsResponse> {\n const firstPage = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, 0);\n const paths = [...firstPage.paths];\n const themes = { ...firstPage.themes };\n let nextOffset = firstPage.nextOffset;\n\n while (nextOffset !== undefined) {\n const page = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, nextOffset);\n paths.push(...page.paths);\n Object.assign(themes, page.themes);\n nextOffset = page.nextOffset;\n }\n\n return { snapshot: firstPage.snapshot, signals: firstPage.signals, themes, paths };\n}\n\nfunction fetchThemePathsPage(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n offset: number,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n limit: '500',\n offset: String(offset),\n });\n return request<ThemePathsResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-paths?${query}`);\n}\n\nexport function fetchTraceInsight(request: TraceIntelligenceRequest, traceId: string) {\n return request<TraceInsightResponse>(`/api/learning/traces/${encodeURIComponent(traceId)}/summary`);\n}\n\nfunction themePath(entityId: string, themeId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/themes/${encodeURIComponent(themeId)}${suffix}`;\n}\n\nfunction noisePath(entityId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/noise${suffix}`;\n}\n"],"names":[],"mappings":"AAgBO,SAAS,kBAAA,CAAmB,SAAmC,UAAA,EAAoB;AACxF,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA,CAA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A,OAAO,EAAE,UAAU,SAAA,CAAU,QAAA,EAAU,SAAS,SAAA,CAAU,OAAA,EAAS,QAAQ,KAAA,EAAM;AACnF;AAEA,SAAS,oBACP,OAAA,EACA,QAAA,EACA,UAAA,EACA,WAAA,EACA,YACA,MAAA,EACA;AACA,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB;AAAA,IAChC,UAAA;AAAA,IACA,WAAA,EAAa,WAAA,CAAY,IAAA,CAAK,GAAG,CAAA;AAAA,IACjC,UAAA;AAAA,IACA,KAAA,EAAO,KAAA;AAAA,IACP,MAAA,EAAQ,OAAO,MAAM;AAAA,GACtB,CAAA;AACD,EAAA,OAAO,QAA4B,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,CAAA,aAAA,EAAgB,KAAK,CAAA,CAAE,CAAA;AAClH;AAEO,SAAS,iBAAA,CAAkB,SAAmC,OAAA,EAAiB;AACpF,EAAA,OAAO,OAAA,CAA8B,CAAA,qBAAA,EAAwB,kBAAA,CAAmB,OAAO,CAAC,CAAA,QAAA,CAAU,CAAA;AACpG;AAEA,SAAS,SAAA,CAAU,QAAA,EAAkB,OAAA,EAAiB,MAAA,EAAgB;AACpE,EAAA,OAAO,CAAA,uBAAA,EAA0B,mBAAmB,QAAQ,CAAC,WAAW,kBAAA,CAAmB,OAAO,CAAC,CAAA,EAAG,MAAM,CAAA,CAAA;AAC9G;AAEA,SAAS,SAAA,CAAU,UAAkB,MAAA,EAAgB;AACnD,EAAA,OAAO,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,SAAS,MAAM,CAAA,CAAA;AAC9E;;;;"}
|
|
1
|
+
{"version":3,"file":"entity-learning-api.es.js","sources":["../../../src/ee/signals/entity-learning-api.ts"],"sourcesContent":["import type { ThemeSelection } from './theme-drilldown-data';\nimport type { TraceIntelligenceRequest } from './trace-intelligence-context';\nimport type {\n NoiseExamplesResponse,\n NoiseResponse,\n ThemeDetailResponse,\n EntityLearningProgressResponse,\n ThemeEntitiesResponse,\n ThemeExamplesResponse,\n ThemeFlowResponse,\n ThemeHistoryResponse,\n ThemePathsResponse,\n ThemeSnapshotsResponse,\n TraceInsightResponse,\n TraceSignalName,\n} from './types';\n\nexport function fetchThemeEntities(request: TraceIntelligenceRequest, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<ThemeEntitiesResponse>(`/api/learning/entities?${query}`);\n}\n\nexport function fetchEntityLearningProgress(request: TraceIntelligenceRequest, entityId: string, entityType: string) {\n const query = new URLSearchParams({ entityType });\n return request<EntityLearningProgressResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/progress?${query}`,\n );\n}\n\nexport function fetchThemeSnapshots(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n dateFrom?: Date,\n dateTo?: Date,\n limit = 24,\n) {\n // Landmarks presentation returns a bounded, time-balanced selection over the\n // whole range instead of the newest-first inventory page.\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n presentation: 'landmarks',\n limit: String(limit),\n });\n if (dateFrom) query.set('from', dateFrom.toISOString());\n if (dateTo) query.set('to', dateTo.toISOString());\n return request<ThemeSnapshotsResponse>(\n `/api/learning/entities/${encodeURIComponent(entityId)}/theme-snapshots?${query}`,\n );\n}\n\nexport function fetchThemeFlow(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: string[],\n snapshotId: string,\n themeLimitPerStage = 8,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n themeLimitPerStage: String(themeLimitPerStage),\n });\n return request<ThemeFlowResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-flow?${query}`);\n}\n\nexport function fetchThemeDetail(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<ThemeDetailResponse>(themePath(entityId, themeId, `?${query}`));\n}\n\nexport function serializeThemeFilters(filters: ThemeSelection[]) {\n return filters.map(filter => `${filter.signalName}:${filter.kind === 'theme' ? filter.themeId : 'noise'}`).join(',');\n}\n\nexport function fetchThemeExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n themeId: string,\n limit = 20,\n offset = 0,\n filters: ThemeSelection[] = [],\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n if (filters.length > 0) query.set('filterThemes', serializeThemeFilters(filters));\n return request<ThemeExamplesResponse>(themePath(entityId, themeId, `/examples?${query}`));\n}\n\nexport function fetchThemeHistory(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n themeId: string,\n limit = 100,\n) {\n const query = new URLSearchParams({ entityType, signalName, limit: String(limit) });\n return request<ThemeHistoryResponse>(themePath(entityId, themeId, `/history?${query}`));\n}\n\nexport function fetchNoise(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n) {\n const query = new URLSearchParams({ entityType, signalName, snapshotId });\n return request<NoiseResponse>(noisePath(entityId, `?${query}`));\n}\n\nexport function fetchNoiseExamples(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string,\n limit = 20,\n offset = 0,\n filters: ThemeSelection[] = [],\n) {\n const query = new URLSearchParams({\n entityType,\n signalName,\n snapshotId,\n limit: String(limit),\n offset: String(offset),\n });\n if (filters.length > 0) query.set('filterThemes', serializeThemeFilters(filters));\n return request<NoiseExamplesResponse>(noisePath(entityId, `/examples?${query}`));\n}\n\nexport async function fetchThemePaths(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n): Promise<ThemePathsResponse> {\n const firstPage = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, 0);\n const paths = [...firstPage.paths];\n const themes = { ...firstPage.themes };\n let nextOffset = firstPage.nextOffset;\n\n while (nextOffset !== undefined) {\n const page = await fetchThemePathsPage(request, entityId, entityType, signalNames, snapshotId, nextOffset);\n paths.push(...page.paths);\n Object.assign(themes, page.themes);\n nextOffset = page.nextOffset;\n }\n\n return { snapshot: firstPage.snapshot, signals: firstPage.signals, themes, paths };\n}\n\nfunction fetchThemePathsPage(\n request: TraceIntelligenceRequest,\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string,\n offset: number,\n) {\n const query = new URLSearchParams({\n entityType,\n signalNames: signalNames.join(','),\n snapshotId,\n limit: '500',\n offset: String(offset),\n });\n return request<ThemePathsResponse>(`/api/learning/entities/${encodeURIComponent(entityId)}/theme-paths?${query}`);\n}\n\nexport function fetchTraceInsight(request: TraceIntelligenceRequest, traceId: string) {\n return request<TraceInsightResponse>(`/api/learning/traces/${encodeURIComponent(traceId)}/summary`);\n}\n\nfunction themePath(entityId: string, themeId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/themes/${encodeURIComponent(themeId)}${suffix}`;\n}\n\nfunction noisePath(entityId: string, suffix: string) {\n return `/api/learning/entities/${encodeURIComponent(entityId)}/noise${suffix}`;\n}\n"],"names":[],"mappings":"AAiBO,SAAS,kBAAA,CAAmB,SAAmC,UAAA,EAAoB;AACxF,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA,CAA+B,CAAA,uBAAA,EAA0B,KAAK,CAAA,CAAE,CAAA;AACzE;AAEO,SAAS,2BAAA,CAA4B,OAAA,EAAmC,QAAA,EAAkB,UAAA,EAAoB;AACnH,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,YAAY,CAAA;AAChD,EAAA,OAAO,OAAA;AAAA,IACL,CAAA,uBAAA,EAA0B,kBAAA,CAAmB,QAAQ,CAAC,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AAA,CAAmB,QAAQ,CAAC,SAAS,MAAM,CAAA,CAAA;AAC9E;;;;"}
|
|
@@ -6,8 +6,9 @@ const reactQuery = require('@tanstack/react-query');
|
|
|
6
6
|
const ee_signals_entityLearningApi = require('../entity-learning-api.cjs.js');
|
|
7
7
|
const ee_signals_useTraceIntelligence = require('../use-trace-intelligence.cjs.js');
|
|
8
8
|
|
|
9
|
-
function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit = 20, offset = 0) {
|
|
9
|
+
function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit = 20, offset = 0, filterThemes = []) {
|
|
10
10
|
const { cacheScope, request } = ee_signals_useTraceIntelligence.useTraceIntelligence();
|
|
11
|
+
const serializedFilters = ee_signals_entityLearningApi.serializeThemeFilters(filterThemes);
|
|
11
12
|
return reactQuery.useQuery({
|
|
12
13
|
queryKey: [
|
|
13
14
|
"entity-learning",
|
|
@@ -18,11 +19,12 @@ function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit =
|
|
|
18
19
|
signalName,
|
|
19
20
|
snapshotId,
|
|
20
21
|
limit,
|
|
21
|
-
offset
|
|
22
|
+
offset,
|
|
23
|
+
serializedFilters
|
|
22
24
|
],
|
|
23
25
|
queryFn: () => {
|
|
24
26
|
if (!signalName || !snapshotId) throw new Error("Noise example queries require a trace signal and snapshot");
|
|
25
|
-
return ee_signals_entityLearningApi.fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset);
|
|
27
|
+
return ee_signals_entityLearningApi.fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset, filterThemes);
|
|
26
28
|
},
|
|
27
29
|
enabled: signalName !== void 0 && snapshotId !== void 0
|
|
28
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-noise-examples.cjs.js","sources":["../../../../src/ee/signals/hooks/use-noise-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchNoiseExamples } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\n\nexport function useNoiseExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName | undefined,\n snapshotId: string | undefined,\n limit = 20,\n offset = 0,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'noise-examples',\n signalName,\n snapshotId,\n limit,\n offset,\n ],\n queryFn: () => {\n if (!signalName || !snapshotId) throw new Error('Noise example queries require a trace signal and snapshot');\n return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset);\n },\n enabled: signalName !== undefined && snapshotId !== undefined,\n });\n}\n"],"names":["useTraceIntelligence","useQuery","fetchNoiseExamples"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-noise-examples.cjs.js","sources":["../../../../src/ee/signals/hooks/use-noise-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchNoiseExamples, serializeThemeFilters } from '../entity-learning-api';\nimport type { ThemeSelection } from '../theme-drilldown-data';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\n\nexport function useNoiseExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName | undefined,\n snapshotId: string | undefined,\n limit = 20,\n offset = 0,\n filterThemes: ThemeSelection[] = [],\n) {\n const { cacheScope, request } = useTraceIntelligence();\n const serializedFilters = serializeThemeFilters(filterThemes);\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'noise-examples',\n signalName,\n snapshotId,\n limit,\n offset,\n serializedFilters,\n ],\n queryFn: () => {\n if (!signalName || !snapshotId) throw new Error('Noise example queries require a trace signal and snapshot');\n return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset, filterThemes);\n },\n enabled: signalName !== undefined && snapshotId !== undefined,\n });\n}\n"],"names":["useTraceIntelligence","serializeThemeFilters","useQuery","fetchNoiseExamples"],"mappings":";;;;;;;;AAOO,SAAS,gBAAA,CACd,QAAA,EACA,UAAA,EACA,UAAA,EACA,UAAA,EACA,KAAA,GAAQ,EAAA,EACR,MAAA,GAAS,CAAA,EACT,YAAA,GAAiC,EAAC,EAClC;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAIA,oDAAA,EAAqB;AACrD,EAAA,MAAM,iBAAA,GAAoBC,mDAAsB,YAAY,CAAA;AAC5D,EAAA,OAAOC,mBAAA,CAAS;AAAA,IACd,QAAA,EAAU;AAAA,MACR,iBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,MAAM;AACb,MAAA,IAAI,CAAC,UAAA,IAAc,CAAC,YAAY,MAAM,IAAI,MAAM,2DAA2D,CAAA;AAC3G,MAAA,OAAOC,+CAAA,CAAmB,SAAS,QAAA,EAAU,UAAA,EAAY,YAAY,UAAA,EAAY,KAAA,EAAO,QAAQ,YAAY,CAAA;AAAA,IAC9G,CAAA;AAAA,IACA,OAAA,EAAS,UAAA,KAAe,MAAA,IAAa,UAAA,KAAe;AAAA,GACrD,CAAA;AACH;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { fetchNoiseExamples } from '../entity-learning-api.es.js';
|
|
2
|
+
import { serializeThemeFilters, fetchNoiseExamples } from '../entity-learning-api.es.js';
|
|
3
3
|
import { useTraceIntelligence } from '../use-trace-intelligence.es.js';
|
|
4
4
|
|
|
5
|
-
function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit = 20, offset = 0) {
|
|
5
|
+
function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit = 20, offset = 0, filterThemes = []) {
|
|
6
6
|
const { cacheScope, request } = useTraceIntelligence();
|
|
7
|
+
const serializedFilters = serializeThemeFilters(filterThemes);
|
|
7
8
|
return useQuery({
|
|
8
9
|
queryKey: [
|
|
9
10
|
"entity-learning",
|
|
@@ -14,11 +15,12 @@ function useNoiseExamples(entityId, entityType, signalName, snapshotId, limit =
|
|
|
14
15
|
signalName,
|
|
15
16
|
snapshotId,
|
|
16
17
|
limit,
|
|
17
|
-
offset
|
|
18
|
+
offset,
|
|
19
|
+
serializedFilters
|
|
18
20
|
],
|
|
19
21
|
queryFn: () => {
|
|
20
22
|
if (!signalName || !snapshotId) throw new Error("Noise example queries require a trace signal and snapshot");
|
|
21
|
-
return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset);
|
|
23
|
+
return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset, filterThemes);
|
|
22
24
|
},
|
|
23
25
|
enabled: signalName !== void 0 && snapshotId !== void 0
|
|
24
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-noise-examples.es.js","sources":["../../../../src/ee/signals/hooks/use-noise-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchNoiseExamples } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\n\nexport function useNoiseExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName | undefined,\n snapshotId: string | undefined,\n limit = 20,\n offset = 0,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'noise-examples',\n signalName,\n snapshotId,\n limit,\n offset,\n ],\n queryFn: () => {\n if (!signalName || !snapshotId) throw new Error('Noise example queries require a trace signal and snapshot');\n return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset);\n },\n enabled: signalName !== undefined && snapshotId !== undefined,\n });\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"use-noise-examples.es.js","sources":["../../../../src/ee/signals/hooks/use-noise-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchNoiseExamples, serializeThemeFilters } from '../entity-learning-api';\nimport type { ThemeSelection } from '../theme-drilldown-data';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\n\nexport function useNoiseExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName | undefined,\n snapshotId: string | undefined,\n limit = 20,\n offset = 0,\n filterThemes: ThemeSelection[] = [],\n) {\n const { cacheScope, request } = useTraceIntelligence();\n const serializedFilters = serializeThemeFilters(filterThemes);\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'noise-examples',\n signalName,\n snapshotId,\n limit,\n offset,\n serializedFilters,\n ],\n queryFn: () => {\n if (!signalName || !snapshotId) throw new Error('Noise example queries require a trace signal and snapshot');\n return fetchNoiseExamples(request, entityId, entityType, signalName, snapshotId, limit, offset, filterThemes);\n },\n enabled: signalName !== undefined && snapshotId !== undefined,\n });\n}\n"],"names":[],"mappings":";;;;AAOO,SAAS,gBAAA,CACd,QAAA,EACA,UAAA,EACA,UAAA,EACA,UAAA,EACA,KAAA,GAAQ,EAAA,EACR,MAAA,GAAS,CAAA,EACT,YAAA,GAAiC,EAAC,EAClC;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAI,oBAAA,EAAqB;AACrD,EAAA,MAAM,iBAAA,GAAoB,sBAAsB,YAAY,CAAA;AAC5D,EAAA,OAAO,QAAA,CAAS;AAAA,IACd,QAAA,EAAU;AAAA,MACR,iBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,MAAM;AACb,MAAA,IAAI,CAAC,UAAA,IAAc,CAAC,YAAY,MAAM,IAAI,MAAM,2DAA2D,CAAA;AAC3G,MAAA,OAAO,kBAAA,CAAmB,SAAS,QAAA,EAAU,UAAA,EAAY,YAAY,UAAA,EAAY,KAAA,EAAO,QAAQ,YAAY,CAAA;AAAA,IAC9G,CAAA;AAAA,IACA,OAAA,EAAS,UAAA,KAAe,MAAA,IAAa,UAAA,KAAe;AAAA,GACrD,CAAA;AACH;;;;"}
|
|
@@ -7,8 +7,9 @@ const ee_signals_entityLearningApi = require('../entity-learning-api.cjs.js');
|
|
|
7
7
|
const ee_signals_useTraceIntelligence = require('../use-trace-intelligence.cjs.js');
|
|
8
8
|
const ee_signals_hooks_themeQueryGuards = require('./theme-query-guards.cjs.js');
|
|
9
9
|
|
|
10
|
-
function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0) {
|
|
10
|
+
function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0, filterThemes = []) {
|
|
11
11
|
const { cacheScope, request } = ee_signals_useTraceIntelligence.useTraceIntelligence();
|
|
12
|
+
const serializedFilters = ee_signals_entityLearningApi.serializeThemeFilters(filterThemes);
|
|
12
13
|
return reactQuery.useQuery({
|
|
13
14
|
queryKey: [
|
|
14
15
|
"entity-learning",
|
|
@@ -20,7 +21,8 @@ function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId,
|
|
|
20
21
|
snapshotId,
|
|
21
22
|
themeId,
|
|
22
23
|
limit,
|
|
23
|
-
offset
|
|
24
|
+
offset,
|
|
25
|
+
serializedFilters
|
|
24
26
|
],
|
|
25
27
|
queryFn: () => ee_signals_entityLearningApi.fetchThemeExamples(
|
|
26
28
|
request,
|
|
@@ -30,7 +32,8 @@ function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId,
|
|
|
30
32
|
ee_signals_hooks_themeQueryGuards.requireSnapshotId(snapshotId),
|
|
31
33
|
ee_signals_hooks_themeQueryGuards.requireNumericThemeId(themeId),
|
|
32
34
|
limit,
|
|
33
|
-
offset
|
|
35
|
+
offset,
|
|
36
|
+
filterThemes
|
|
34
37
|
),
|
|
35
38
|
enabled: snapshotId !== void 0 && ee_signals_hooks_themeQueryGuards.isNumericThemeId(themeId)
|
|
36
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-examples.cjs.js","sources":["../../../../src/ee/signals/hooks/use-theme-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemeExamples } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { isNumericThemeId, requireNumericThemeId, requireSnapshotId } from './theme-query-guards';\n\nexport function useThemeExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string | undefined,\n themeId: string | undefined,\n limit = 20,\n offset = 0,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'theme-examples',\n signalName,\n snapshotId,\n themeId,\n limit,\n offset,\n ],\n queryFn: () =>\n fetchThemeExamples(\n request,\n entityId,\n entityType,\n signalName,\n requireSnapshotId(snapshotId),\n requireNumericThemeId(themeId),\n limit,\n offset,\n ),\n enabled: snapshotId !== undefined && isNumericThemeId(themeId),\n });\n}\n"],"names":["useTraceIntelligence","useQuery","fetchThemeExamples","requireSnapshotId","requireNumericThemeId","isNumericThemeId"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use-theme-examples.cjs.js","sources":["../../../../src/ee/signals/hooks/use-theme-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemeExamples, serializeThemeFilters } from '../entity-learning-api';\nimport type { ThemeSelection } from '../theme-drilldown-data';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { isNumericThemeId, requireNumericThemeId, requireSnapshotId } from './theme-query-guards';\n\nexport function useThemeExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string | undefined,\n themeId: string | undefined,\n limit = 20,\n offset = 0,\n filterThemes: ThemeSelection[] = [],\n) {\n const { cacheScope, request } = useTraceIntelligence();\n const serializedFilters = serializeThemeFilters(filterThemes);\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'theme-examples',\n signalName,\n snapshotId,\n themeId,\n limit,\n offset,\n serializedFilters,\n ],\n queryFn: () =>\n fetchThemeExamples(\n request,\n entityId,\n entityType,\n signalName,\n requireSnapshotId(snapshotId),\n requireNumericThemeId(themeId),\n limit,\n offset,\n filterThemes,\n ),\n enabled: snapshotId !== undefined && isNumericThemeId(themeId),\n });\n}\n"],"names":["useTraceIntelligence","serializeThemeFilters","useQuery","fetchThemeExamples","requireSnapshotId","requireNumericThemeId","isNumericThemeId"],"mappings":";;;;;;;;;AAQO,SAAS,gBAAA,CACd,QAAA,EACA,UAAA,EACA,UAAA,EACA,UAAA,EACA,OAAA,EACA,KAAA,GAAQ,EAAA,EACR,MAAA,GAAS,CAAA,EACT,YAAA,GAAiC,EAAC,EAClC;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAIA,oDAAA,EAAqB;AACrD,EAAA,MAAM,iBAAA,GAAoBC,mDAAsB,YAAY,CAAA;AAC5D,EAAA,OAAOC,mBAAA,CAAS;AAAA,IACd,QAAA,EAAU;AAAA,MACR,iBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,MACPC,+CAAA;AAAA,MACE,OAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACAC,oDAAkB,UAAU,CAAA;AAAA,MAC5BC,wDAAsB,OAAO,CAAA;AAAA,MAC7B,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACF,OAAA,EAAS,UAAA,KAAe,MAAA,IAAaC,kDAAA,CAAiB,OAAO;AAAA,GAC9D,CAAA;AACH;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
|
-
import { fetchThemeExamples } from '../entity-learning-api.es.js';
|
|
2
|
+
import { serializeThemeFilters, fetchThemeExamples } from '../entity-learning-api.es.js';
|
|
3
3
|
import { useTraceIntelligence } from '../use-trace-intelligence.es.js';
|
|
4
4
|
import { isNumericThemeId, requireNumericThemeId, requireSnapshotId } from './theme-query-guards.es.js';
|
|
5
5
|
|
|
6
|
-
function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0) {
|
|
6
|
+
function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId, limit = 20, offset = 0, filterThemes = []) {
|
|
7
7
|
const { cacheScope, request } = useTraceIntelligence();
|
|
8
|
+
const serializedFilters = serializeThemeFilters(filterThemes);
|
|
8
9
|
return useQuery({
|
|
9
10
|
queryKey: [
|
|
10
11
|
"entity-learning",
|
|
@@ -16,7 +17,8 @@ function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId,
|
|
|
16
17
|
snapshotId,
|
|
17
18
|
themeId,
|
|
18
19
|
limit,
|
|
19
|
-
offset
|
|
20
|
+
offset,
|
|
21
|
+
serializedFilters
|
|
20
22
|
],
|
|
21
23
|
queryFn: () => fetchThemeExamples(
|
|
22
24
|
request,
|
|
@@ -26,7 +28,8 @@ function useThemeExamples(entityId, entityType, signalName, snapshotId, themeId,
|
|
|
26
28
|
requireSnapshotId(snapshotId),
|
|
27
29
|
requireNumericThemeId(themeId),
|
|
28
30
|
limit,
|
|
29
|
-
offset
|
|
31
|
+
offset,
|
|
32
|
+
filterThemes
|
|
30
33
|
),
|
|
31
34
|
enabled: snapshotId !== void 0 && isNumericThemeId(themeId)
|
|
32
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-examples.es.js","sources":["../../../../src/ee/signals/hooks/use-theme-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemeExamples } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { isNumericThemeId, requireNumericThemeId, requireSnapshotId } from './theme-query-guards';\n\nexport function useThemeExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string | undefined,\n themeId: string | undefined,\n limit = 20,\n offset = 0,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'theme-examples',\n signalName,\n snapshotId,\n themeId,\n limit,\n offset,\n ],\n queryFn: () =>\n fetchThemeExamples(\n request,\n entityId,\n entityType,\n signalName,\n requireSnapshotId(snapshotId),\n requireNumericThemeId(themeId),\n limit,\n offset,\n ),\n enabled: snapshotId !== undefined && isNumericThemeId(themeId),\n });\n}\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"use-theme-examples.es.js","sources":["../../../../src/ee/signals/hooks/use-theme-examples.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemeExamples, serializeThemeFilters } from '../entity-learning-api';\nimport type { ThemeSelection } from '../theme-drilldown-data';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { isNumericThemeId, requireNumericThemeId, requireSnapshotId } from './theme-query-guards';\n\nexport function useThemeExamples(\n entityId: string,\n entityType: string,\n signalName: TraceSignalName,\n snapshotId: string | undefined,\n themeId: string | undefined,\n limit = 20,\n offset = 0,\n filterThemes: ThemeSelection[] = [],\n) {\n const { cacheScope, request } = useTraceIntelligence();\n const serializedFilters = serializeThemeFilters(filterThemes);\n return useQuery({\n queryKey: [\n 'entity-learning',\n cacheScope,\n entityType,\n entityId,\n 'theme-examples',\n signalName,\n snapshotId,\n themeId,\n limit,\n offset,\n serializedFilters,\n ],\n queryFn: () =>\n fetchThemeExamples(\n request,\n entityId,\n entityType,\n signalName,\n requireSnapshotId(snapshotId),\n requireNumericThemeId(themeId),\n limit,\n offset,\n filterThemes,\n ),\n enabled: snapshotId !== undefined && isNumericThemeId(themeId),\n });\n}\n"],"names":[],"mappings":";;;;;AAQO,SAAS,gBAAA,CACd,QAAA,EACA,UAAA,EACA,UAAA,EACA,UAAA,EACA,OAAA,EACA,KAAA,GAAQ,EAAA,EACR,MAAA,GAAS,CAAA,EACT,YAAA,GAAiC,EAAC,EAClC;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAI,oBAAA,EAAqB;AACrD,EAAA,MAAM,iBAAA,GAAoB,sBAAsB,YAAY,CAAA;AAC5D,EAAA,OAAO,QAAA,CAAS;AAAA,IACd,QAAA,EAAU;AAAA,MACR,iBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,MACP,kBAAA;AAAA,MACE,OAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,kBAAkB,UAAU,CAAA;AAAA,MAC5B,sBAAsB,OAAO,CAAA;AAAA,MAC7B,KAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACF;AAAA,IACF,OAAA,EAAS,UAAA,KAAe,MAAA,IAAa,gBAAA,CAAiB,OAAO;AAAA,GAC9D,CAAA;AACH;;;;"}
|
|
@@ -7,12 +7,12 @@ const ee_signals_entityLearningApi = require('../entity-learning-api.cjs.js');
|
|
|
7
7
|
const ee_signals_useTraceIntelligence = require('../use-trace-intelligence.cjs.js');
|
|
8
8
|
const ee_signals_hooks_themeQueryGuards = require('./theme-query-guards.cjs.js');
|
|
9
9
|
|
|
10
|
-
function useThemePaths(entityId, entityType, signalNames, snapshotId,
|
|
10
|
+
function useThemePaths(entityId, entityType, signalNames, snapshotId, enabled) {
|
|
11
11
|
const { cacheScope, request } = ee_signals_useTraceIntelligence.useTraceIntelligence();
|
|
12
12
|
return reactQuery.useQuery({
|
|
13
13
|
queryKey: ["entity-learning", cacheScope, entityType, entityId, "theme-paths", signalNames, snapshotId],
|
|
14
14
|
queryFn: () => ee_signals_entityLearningApi.fetchThemePaths(request, entityId, entityType, signalNames, ee_signals_hooks_themeQueryGuards.requireSnapshotId(snapshotId)),
|
|
15
|
-
enabled: snapshotId !== void 0 &&
|
|
15
|
+
enabled: snapshotId !== void 0 && enabled === true,
|
|
16
16
|
staleTime: 3e4
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-paths.cjs.js","sources":["../../../../src/ee/signals/hooks/use-theme-paths.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemePaths } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport {
|
|
1
|
+
{"version":3,"file":"use-theme-paths.cjs.js","sources":["../../../../src/ee/signals/hooks/use-theme-paths.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemePaths } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { requireSnapshotId } from './theme-query-guards';\n\nexport function useThemePaths(\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string | undefined,\n enabled: boolean | undefined,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: ['entity-learning', cacheScope, entityType, entityId, 'theme-paths', signalNames, snapshotId],\n queryFn: () => fetchThemePaths(request, entityId, entityType, signalNames, requireSnapshotId(snapshotId)),\n enabled: snapshotId !== undefined && enabled === true,\n staleTime: 30_000,\n });\n}\n"],"names":["useTraceIntelligence","useQuery","fetchThemePaths","requireSnapshotId"],"mappings":";;;;;;;;;AAOO,SAAS,aAAA,CACd,QAAA,EACA,UAAA,EACA,WAAA,EACA,YACA,OAAA,EACA;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAIA,oDAAA,EAAqB;AACrD,EAAA,OAAOC,mBAAA,CAAS;AAAA,IACd,QAAA,EAAU,CAAC,iBAAA,EAAmB,UAAA,EAAY,YAAY,QAAA,EAAU,aAAA,EAAe,aAAa,UAAU,CAAA;AAAA,IACtG,OAAA,EAAS,MAAMC,4CAAA,CAAgB,OAAA,EAAS,UAAU,UAAA,EAAY,WAAA,EAAaC,mDAAA,CAAkB,UAAU,CAAC,CAAA;AAAA,IACxG,OAAA,EAAS,UAAA,KAAe,MAAA,IAAa,OAAA,KAAY,IAAA;AAAA,IACjD,SAAA,EAAW;AAAA,GACZ,CAAA;AACH;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { fetchThemePaths } from '../entity-learning-api.es.js';
|
|
3
3
|
import { useTraceIntelligence } from '../use-trace-intelligence.es.js';
|
|
4
|
-
import {
|
|
4
|
+
import { requireSnapshotId } from './theme-query-guards.es.js';
|
|
5
5
|
|
|
6
|
-
function useThemePaths(entityId, entityType, signalNames, snapshotId,
|
|
6
|
+
function useThemePaths(entityId, entityType, signalNames, snapshotId, enabled) {
|
|
7
7
|
const { cacheScope, request } = useTraceIntelligence();
|
|
8
8
|
return useQuery({
|
|
9
9
|
queryKey: ["entity-learning", cacheScope, entityType, entityId, "theme-paths", signalNames, snapshotId],
|
|
10
10
|
queryFn: () => fetchThemePaths(request, entityId, entityType, signalNames, requireSnapshotId(snapshotId)),
|
|
11
|
-
enabled: snapshotId !== void 0 &&
|
|
11
|
+
enabled: snapshotId !== void 0 && enabled === true,
|
|
12
12
|
staleTime: 3e4
|
|
13
13
|
});
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-theme-paths.es.js","sources":["../../../../src/ee/signals/hooks/use-theme-paths.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemePaths } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport {
|
|
1
|
+
{"version":3,"file":"use-theme-paths.es.js","sources":["../../../../src/ee/signals/hooks/use-theme-paths.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\n\nimport { fetchThemePaths } from '../entity-learning-api';\nimport type { TraceSignalName } from '../types';\nimport { useTraceIntelligence } from '../use-trace-intelligence';\nimport { requireSnapshotId } from './theme-query-guards';\n\nexport function useThemePaths(\n entityId: string,\n entityType: string,\n signalNames: TraceSignalName[],\n snapshotId: string | undefined,\n enabled: boolean | undefined,\n) {\n const { cacheScope, request } = useTraceIntelligence();\n return useQuery({\n queryKey: ['entity-learning', cacheScope, entityType, entityId, 'theme-paths', signalNames, snapshotId],\n queryFn: () => fetchThemePaths(request, entityId, entityType, signalNames, requireSnapshotId(snapshotId)),\n enabled: snapshotId !== undefined && enabled === true,\n staleTime: 30_000,\n });\n}\n"],"names":[],"mappings":";;;;;AAOO,SAAS,aAAA,CACd,QAAA,EACA,UAAA,EACA,WAAA,EACA,YACA,OAAA,EACA;AACA,EAAA,MAAM,EAAE,UAAA,EAAY,OAAA,EAAQ,GAAI,oBAAA,EAAqB;AACrD,EAAA,OAAO,QAAA,CAAS;AAAA,IACd,QAAA,EAAU,CAAC,iBAAA,EAAmB,UAAA,EAAY,YAAY,QAAA,EAAU,aAAA,EAAe,aAAa,UAAU,CAAA;AAAA,IACtG,OAAA,EAAS,MAAM,eAAA,CAAgB,OAAA,EAAS,UAAU,UAAA,EAAY,WAAA,EAAa,iBAAA,CAAkB,UAAU,CAAC,CAAA;AAAA,IACxG,OAAA,EAAS,UAAA,KAAe,MAAA,IAAa,OAAA,KAAY,IAAA;AAAA,IACjD,SAAA,EAAW;AAAA,GACZ,CAAA;AACH;;;;"}
|
|
@@ -98,7 +98,7 @@ function LifelineRow({
|
|
|
98
98
|
positionPercent: positions[point.snapshotIndex],
|
|
99
99
|
height: barHeight(point.share),
|
|
100
100
|
color: sankeyColor.nodeColor(hue),
|
|
101
|
-
onSelect: themeId === void 0 ? void 0 : () => onThemeSelect({ signalName, themeId, label: row.label }, point.snapshotIndex)
|
|
101
|
+
onSelect: themeId === void 0 ? void 0 : () => onThemeSelect({ kind: "theme", signalName, themeId, label: row.label }, point.snapshotIndex)
|
|
102
102
|
},
|
|
103
103
|
point.snapshotIndex
|
|
104
104
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifeline-row.cjs.js","sources":["../../../src/ee/signals/lifeline-row.tsx"],"sourcesContent":["import { LifelinePoint } from './lifeline-point';\nimport { formatSnapshotCutoff } from './signal-formatting';\nimport type { ThemeSelection } from './theme-drilldown-data';\nimport { lifelineConnectors, lifelineSegments } from './theme-lifelines-data';\nimport type { ThemeLifeline, ThemeLifelinePoint } from './theme-lifelines-data';\nimport type { ThemeSnapshot, TraceSignalName } from './types';\nimport { nodeColor } from '@/ds/components/SankeyChart';\n\nconst TRACK_HEIGHT = 28;\nconst MAX_BAR_HEIGHT = 22;\nconst MIN_BAR_HEIGHT = 4;\n\nfunction barHeight(share: number) {\n return Math.max(MIN_BAR_HEIGHT, Math.round(share * MAX_BAR_HEIGHT));\n}\n\nfunction pointTitle(snapshot: ThemeSnapshot | undefined, label: string, traceCount: number, share: number) {\n const cutoff = snapshot?.cutoffAt ? formatSnapshotCutoff(snapshot.cutoffAt) : undefined;\n return `${label}${cutoff ? ` · ${cutoff}` : ''} · ${traceCount} traces (${Math.round(share * 100)}%)`;\n}\n\nfunction lifelineArea(segment: ThemeLifelinePoint[], positions: number[]) {\n const firstPoint = segment[0];\n const lastPoint = segment.at(-1);\n if (!firstPoint || !lastPoint) return undefined;\n\n return {\n key: firstPoint.snapshotIndex,\n points: [\n `${positions[firstPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ...segment.map(point => `${positions[point.snapshotIndex]},${TRACK_HEIGHT - 1 - barHeight(point.share)}`),\n `${positions[lastPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ].join(' '),\n };\n}\n\nexport function LifelineRow({\n row,\n signalName,\n snapshots,\n positions,\n hue,\n onThemeSelect,\n}: {\n row: ThemeLifeline;\n signalName: TraceSignalName;\n snapshots: ThemeSnapshot[];\n positions: number[];\n hue: number;\n onThemeSelect: (selection: ThemeSelection, snapshotIndex: number) => void;\n}) {\n const isPersistent = row.points.length * 2 >= snapshots.length;\n const connectors = lifelineConnectors(row.points);\n const segments = lifelineSegments(row.points);\n const pointY = (point: ThemeLifelinePoint) => TRACK_HEIGHT - 1 - barHeight(point.share);\n\n return (\n <li\n aria-label={`${row.label}: present in ${row.points.length} of ${snapshots.length} landmarks`}\n className={`group hover:bg-surface3 flex items-center gap-3 rounded-md transition-colors ${isPersistent ? '' : 'opacity-55 hover:opacity-100'}`}\n >\n <span\n className=\"text-neutral4 group-hover:text-neutral6 w-52 shrink-0 truncate text-right text-xs\"\n title={row.label}\n >\n {row.label}\n </span>\n <div className=\"border-border1 relative mx-2 h-7 min-w-0 flex-1 border-b\">\n {connectors.length > 0 || segments.length > 0 ? (\n <svg\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n preserveAspectRatio=\"none\"\n viewBox={`0 0 100 ${TRACK_HEIGHT}`}\n >\n {segments.map(segment => {\n const area = lifelineArea(segment, positions);\n if (!area) return undefined;\n return <polygon key={`area-${area.key}`} fill={nodeColor(hue)} fillOpacity={0.14} points={area.points} />;\n })}\n {connectors.map(({ from, to }) => (\n <line\n key={`${from.snapshotIndex}-${to.snapshotIndex}`}\n stroke={nodeColor(hue)}\n strokeOpacity={0.45}\n strokeWidth={1.2}\n vectorEffect=\"non-scaling-stroke\"\n x1={positions[from.snapshotIndex]}\n y1={pointY(from)}\n x2={positions[to.snapshotIndex]}\n y2={pointY(to)}\n />\n ))}\n </svg>\n ) : null}\n {row.points.map(point => {\n const title = pointTitle(snapshots[point.snapshotIndex], row.label, point.traceCount, point.share);\n const themeId = point.themeId;\n return (\n <LifelinePoint\n key={point.snapshotIndex}\n title={title}\n positionPercent={positions[point.snapshotIndex]}\n height={barHeight(point.share)}\n color={nodeColor(hue)}\n onSelect={\n themeId === undefined\n ? undefined\n : () => onThemeSelect({ signalName, themeId, label: row.label }, point.snapshotIndex)\n }\n />\n );\n })}\n </div>\n <span className=\"text-neutral3 w-9 shrink-0 font-mono text-[11px] tabular-nums\">\n {row.points.length}/{snapshots.length}\n </span>\n </li>\n );\n}\n"],"names":["formatSnapshotCutoff","lifelineConnectors","lifelineSegments","jsxs","jsx","nodeColor","LifelinePoint"],"mappings":";;;;;;;;;;AAQA,MAAM,YAAA,GAAe,EAAA;AACrB,MAAM,cAAA,GAAiB,EAAA;AACvB,MAAM,cAAA,GAAiB,CAAA;AAEvB,SAAS,UAAU,KAAA,EAAe;AAChC,EAAA,OAAO,KAAK,GAAA,CAAI,cAAA,EAAgB,KAAK,KAAA,CAAM,KAAA,GAAQ,cAAc,CAAC,CAAA;AACpE;AAEA,SAAS,UAAA,CAAW,QAAA,EAAqC,KAAA,EAAe,UAAA,EAAoB,KAAA,EAAe;AACzG,EAAA,MAAM,SAAS,QAAA,EAAU,QAAA,GAAWA,gDAAA,CAAqB,QAAA,CAAS,QAAQ,CAAA,GAAI,MAAA;AAC9E,EAAA,OAAO,CAAA,EAAG,KAAK,CAAA,EAAG,MAAA,GAAS,MAAM,MAAM,CAAA,CAAA,GAAK,EAAE,CAAA,GAAA,EAAM,UAAU,CAAA,SAAA,EAAY,IAAA,CAAK,KAAA,CAAM,KAAA,G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ourcesContent":["import { LifelinePoint } from './lifeline-point';\nimport { formatSnapshotCutoff } from './signal-formatting';\nimport type { ThemeSelection } from './theme-drilldown-data';\nimport { lifelineConnectors, lifelineSegments } from './theme-lifelines-data';\nimport type { ThemeLifeline, ThemeLifelinePoint } from './theme-lifelines-data';\nimport type { ThemeSnapshot, TraceSignalName } from './types';\nimport { nodeColor } from '@/ds/components/SankeyChart';\n\nconst TRACK_HEIGHT = 28;\nconst MAX_BAR_HEIGHT = 22;\nconst MIN_BAR_HEIGHT = 4;\n\nfunction barHeight(share: number) {\n return Math.max(MIN_BAR_HEIGHT, Math.round(share * MAX_BAR_HEIGHT));\n}\n\nfunction pointTitle(snapshot: ThemeSnapshot | undefined, label: string, traceCount: number, share: number) {\n const cutoff = snapshot?.cutoffAt ? formatSnapshotCutoff(snapshot.cutoffAt) : undefined;\n return `${label}${cutoff ? ` · ${cutoff}` : ''} · ${traceCount} traces (${Math.round(share * 100)}%)`;\n}\n\nfunction lifelineArea(segment: ThemeLifelinePoint[], positions: number[]) {\n const firstPoint = segment[0];\n const lastPoint = segment.at(-1);\n if (!firstPoint || !lastPoint) return undefined;\n\n return {\n key: firstPoint.snapshotIndex,\n points: [\n `${positions[firstPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ...segment.map(point => `${positions[point.snapshotIndex]},${TRACK_HEIGHT - 1 - barHeight(point.share)}`),\n `${positions[lastPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ].join(' '),\n };\n}\n\nexport function LifelineRow({\n row,\n signalName,\n snapshots,\n positions,\n hue,\n onThemeSelect,\n}: {\n row: ThemeLifeline;\n signalName: TraceSignalName;\n snapshots: ThemeSnapshot[];\n positions: number[];\n hue: number;\n onThemeSelect: (selection: ThemeSelection, snapshotIndex: number) => void;\n}) {\n const isPersistent = row.points.length * 2 >= snapshots.length;\n const connectors = lifelineConnectors(row.points);\n const segments = lifelineSegments(row.points);\n const pointY = (point: ThemeLifelinePoint) => TRACK_HEIGHT - 1 - barHeight(point.share);\n\n return (\n <li\n aria-label={`${row.label}: present in ${row.points.length} of ${snapshots.length} landmarks`}\n className={`group hover:bg-surface3 flex items-center gap-3 rounded-md transition-colors ${isPersistent ? '' : 'opacity-55 hover:opacity-100'}`}\n >\n <span\n className=\"text-neutral4 group-hover:text-neutral6 w-52 shrink-0 truncate text-right text-xs\"\n title={row.label}\n >\n {row.label}\n </span>\n <div className=\"border-border1 relative mx-2 h-7 min-w-0 flex-1 border-b\">\n {connectors.length > 0 || segments.length > 0 ? (\n <svg\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n preserveAspectRatio=\"none\"\n viewBox={`0 0 100 ${TRACK_HEIGHT}`}\n >\n {segments.map(segment => {\n const area = lifelineArea(segment, positions);\n if (!area) return undefined;\n return <polygon key={`area-${area.key}`} fill={nodeColor(hue)} fillOpacity={0.14} points={area.points} />;\n })}\n {connectors.map(({ from, to }) => (\n <line\n key={`${from.snapshotIndex}-${to.snapshotIndex}`}\n stroke={nodeColor(hue)}\n strokeOpacity={0.45}\n strokeWidth={1.2}\n vectorEffect=\"non-scaling-stroke\"\n x1={positions[from.snapshotIndex]}\n y1={pointY(from)}\n x2={positions[to.snapshotIndex]}\n y2={pointY(to)}\n />\n ))}\n </svg>\n ) : null}\n {row.points.map(point => {\n const title = pointTitle(snapshots[point.snapshotIndex], row.label, point.traceCount, point.share);\n const themeId = point.themeId;\n return (\n <LifelinePoint\n key={point.snapshotIndex}\n title={title}\n positionPercent={positions[point.snapshotIndex]}\n height={barHeight(point.share)}\n color={nodeColor(hue)}\n onSelect={\n themeId === undefined\n ? undefined\n : () => onThemeSelect({ kind: 'theme', signalName, themeId, label: row.label }, point.snapshotIndex)\n }\n />\n );\n })}\n </div>\n <span className=\"text-neutral3 w-9 shrink-0 font-mono text-[11px] tabular-nums\">\n {row.points.length}/{snapshots.length}\n </span>\n </li>\n );\n}\n"],"names":["formatSnapshotCutoff","lifelineConnectors","lifelineSegments","jsxs","jsx","n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ACE,IAAA;AAAA,UACH,GAAA,CAAI,MAAA,CAAO,GAAA,CAAI,CAAA,KAAA,KAAS;AACvB,YAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,SAAA,CAAU,KAAA,CAAM,aAAa,CAAA,EAAG,GAAA,CAAI,KAAA,EAAO,KAAA,CAAM,UAAA,EAAY,KAAA,CAAM,KAAK,CAAA;AACjG,YAAA,MAAM,UAAU,KAAA,CAAM,OAAA;AACtB,YAAA,uBACED,cAAA;AAAA,cAACE,sCAAA;AAAA,cAAA;AAAA,gBAEC,KAAA;AAAA,gBACA,eAAA,EAAiB,SAAA,CAAU,KAAA,CAAM,aAAa,CAAA;AAAA,gBAC9C,MAAA,EAAQ,SAAA,CAAU,KAAA,CAAM,KAAK,CAAA;AAAA,gBAC7B,KAAA,EAAOD,sBAAU,GAAG,CAAA;AAAA,gBACpB,UACE,OAAA,KAAY,MAAA,GACR,MAAA,GACA,MAAM,cAAc,EAAE,IAAA,EAAM,OAAA,EAAS,UAAA,EAAY,SAAS,KAAA,EAAO,GAAA,CAAI,KAAA,EAAM,EAAG,MAAM,aAAa;AAAA,eAAA;AAAA,cARlG,KAAA,CAAM;AAAA,aAUb;AAAA,UAEJ,CAAC;AAAA,SAAA,EACH,CAAA;AAAA,wBACAF,eAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,+DAAA,EACb,QAAA,EAAA;AAAA,UAAA,GAAA,CAAI,MAAA,CAAO,MAAA;AAAA,UAAO,GAAA;AAAA,UAAE,SAAA,CAAU;AAAA,SAAA,EACjC;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -94,7 +94,7 @@ function LifelineRow({
|
|
|
94
94
|
positionPercent: positions[point.snapshotIndex],
|
|
95
95
|
height: barHeight(point.share),
|
|
96
96
|
color: nodeColor(hue),
|
|
97
|
-
onSelect: themeId === void 0 ? void 0 : () => onThemeSelect({ signalName, themeId, label: row.label }, point.snapshotIndex)
|
|
97
|
+
onSelect: themeId === void 0 ? void 0 : () => onThemeSelect({ kind: "theme", signalName, themeId, label: row.label }, point.snapshotIndex)
|
|
98
98
|
},
|
|
99
99
|
point.snapshotIndex
|
|
100
100
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifeline-row.es.js","sources":["../../../src/ee/signals/lifeline-row.tsx"],"sourcesContent":["import { LifelinePoint } from './lifeline-point';\nimport { formatSnapshotCutoff } from './signal-formatting';\nimport type { ThemeSelection } from './theme-drilldown-data';\nimport { lifelineConnectors, lifelineSegments } from './theme-lifelines-data';\nimport type { ThemeLifeline, ThemeLifelinePoint } from './theme-lifelines-data';\nimport type { ThemeSnapshot, TraceSignalName } from './types';\nimport { nodeColor } from '@/ds/components/SankeyChart';\n\nconst TRACK_HEIGHT = 28;\nconst MAX_BAR_HEIGHT = 22;\nconst MIN_BAR_HEIGHT = 4;\n\nfunction barHeight(share: number) {\n return Math.max(MIN_BAR_HEIGHT, Math.round(share * MAX_BAR_HEIGHT));\n}\n\nfunction pointTitle(snapshot: ThemeSnapshot | undefined, label: string, traceCount: number, share: number) {\n const cutoff = snapshot?.cutoffAt ? formatSnapshotCutoff(snapshot.cutoffAt) : undefined;\n return `${label}${cutoff ? ` · ${cutoff}` : ''} · ${traceCount} traces (${Math.round(share * 100)}%)`;\n}\n\nfunction lifelineArea(segment: ThemeLifelinePoint[], positions: number[]) {\n const firstPoint = segment[0];\n const lastPoint = segment.at(-1);\n if (!firstPoint || !lastPoint) return undefined;\n\n return {\n key: firstPoint.snapshotIndex,\n points: [\n `${positions[firstPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ...segment.map(point => `${positions[point.snapshotIndex]},${TRACK_HEIGHT - 1 - barHeight(point.share)}`),\n `${positions[lastPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ].join(' '),\n };\n}\n\nexport function LifelineRow({\n row,\n signalName,\n snapshots,\n positions,\n hue,\n onThemeSelect,\n}: {\n row: ThemeLifeline;\n signalName: TraceSignalName;\n snapshots: ThemeSnapshot[];\n positions: number[];\n hue: number;\n onThemeSelect: (selection: ThemeSelection, snapshotIndex: number) => void;\n}) {\n const isPersistent = row.points.length * 2 >= snapshots.length;\n const connectors = lifelineConnectors(row.points);\n const segments = lifelineSegments(row.points);\n const pointY = (point: ThemeLifelinePoint) => TRACK_HEIGHT - 1 - barHeight(point.share);\n\n return (\n <li\n aria-label={`${row.label}: present in ${row.points.length} of ${snapshots.length} landmarks`}\n className={`group hover:bg-surface3 flex items-center gap-3 rounded-md transition-colors ${isPersistent ? '' : 'opacity-55 hover:opacity-100'}`}\n >\n <span\n className=\"text-neutral4 group-hover:text-neutral6 w-52 shrink-0 truncate text-right text-xs\"\n title={row.label}\n >\n {row.label}\n </span>\n <div className=\"border-border1 relative mx-2 h-7 min-w-0 flex-1 border-b\">\n {connectors.length > 0 || segments.length > 0 ? (\n <svg\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n preserveAspectRatio=\"none\"\n viewBox={`0 0 100 ${TRACK_HEIGHT}`}\n >\n {segments.map(segment => {\n const area = lifelineArea(segment, positions);\n if (!area) return undefined;\n return <polygon key={`area-${area.key}`} fill={nodeColor(hue)} fillOpacity={0.14} points={area.points} />;\n })}\n {connectors.map(({ from, to }) => (\n <line\n key={`${from.snapshotIndex}-${to.snapshotIndex}`}\n stroke={nodeColor(hue)}\n strokeOpacity={0.45}\n strokeWidth={1.2}\n vectorEffect=\"non-scaling-stroke\"\n x1={positions[from.snapshotIndex]}\n y1={pointY(from)}\n x2={positions[to.snapshotIndex]}\n y2={pointY(to)}\n />\n ))}\n </svg>\n ) : null}\n {row.points.map(point => {\n const title = pointTitle(snapshots[point.snapshotIndex], row.label, point.traceCount, point.share);\n const themeId = point.themeId;\n return (\n <LifelinePoint\n key={point.snapshotIndex}\n title={title}\n positionPercent={positions[point.snapshotIndex]}\n height={barHeight(point.share)}\n color={nodeColor(hue)}\n onSelect={\n themeId === undefined\n ? undefined\n : () => onThemeSelect({ signalName, themeId, label: row.label }, point.snapshotIndex)\n }\n />\n );\n })}\n </div>\n <span className=\"text-neutral3 w-9 shrink-0 font-mono text-[11px] tabular-nums\">\n {row.points.length}/{snapshots.length}\n </span>\n </li>\n );\n}\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,YAAA,GAAe,EAAA;AACrB,MAAM,cAAA,GAAiB,EAAA;AACvB,MAAM,cAAA,GAAiB,CAAA;AAEvB,SAAS,UAAU,KAAA,EAAe;AAChC,EAAA,OAAO,KAAK,GAAA,CAAI,cAAA,EAAgB,KAAK,KAAA,CAAM,KAAA,GAAQ,cAAc,CAAC,CAAA;AACpE;AAEA,SAAS,UAAA,CAAW,QAAA,EAAqC,KAAA,EAAe,UAAA,EAAoB,KAAA,EAAe;AACzG,EAAA,MAAM,SAAS,QAAA,EAAU,QAAA,GAAW,oBAAA,CAAqB,QAAA,CAAS,QAAQ,CAAA,GAAI,MAAA;AAC9E,EAAA,OAAO,CAAA,EAAG,KAAK,CAAA,EAAG,MAAA,GAAS,MAAM,MAAM,CAAA,CAAA,GAAK,EAAE,CAAA,GAAA,EAAM,UAAU,CAAA,SAAA,EAAY,IAAA,CAAK,KAAA,CAAM,KAAA,GAAQ,GAAG,CAAC,CAAA,EAAA,CAAA;AACnG;AAEA,SAAS,YAAA,CAAa,SAA+B,SAAA,EAAqB;AACxE,EAAA,MAAM,UAAA,GAAa,QAAQ,CAAC,CAAA;AAC5B,EAAA,MAAM,SAAA,GAAY,OAAA,CAAQ,EAAA,CAAG,EAAE,CAAA;AAC/B,EAAA,IAAI,CAAC,UAAA,IAAc,CAAC,SAAA,EAAW,OAAO,MAAA;AAEtC,EAAA,OAAO;AAAA,IACL,KAAK,UAAA,CAAW,aAAA;AAAA,IAChB,MAAA,EAAQ;AAAA,MACN,GAAG,SAAA,CAAU,UAAA,CAAW,aAAa,CAAC,CAAA,CAAA,EAAI,eAAe,CAAC,CAAA,CAAA;AAAA,MAC1D,GAAG,OAAA,CAAQ,GAAA,CAAI,CA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AAA,kBARR,CAAA,EAAG,IAAA,CAAK,aAAa,CAAA,CAAA,EAAI,GAAG,aAAa,CAAA;AAAA,iBAUjD;AAAA;AAAA;AAAA,WACH,GACE,IAAA;AAAA,UACH,GAAA,CAAI,MAAA,CAAO,GAAA,CAAI,CAAA,KAAA,KAAS;AACvB,YAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,SAAA,CAAU,KAAA,CAAM,aAAa,CAAA,EAAG,GAAA,CAAI,KAAA,EAAO,KAAA,CAAM,UAAA,EAAY,KAAA,CAAM,KAAK,CAAA;AACjG,YAAA,MAAM,UAAU,KAAA,CAAM,OAAA;AACtB,YAAA,uBACE,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBAEC,KAAA;AAAA,gBACA,eAAA,EAAiB,SAAA,CAAU,KAAA,CAAM,aAAa,CAAA;AAAA,gBAC9C,MAAA,EAAQ,SAAA,CAAU,KAAA,CAAM,KAAK,CAAA;AAAA,gBAC7B,KAAA,EAAO,UAAU,GAAG,CAAA;AAAA,gBACpB,
|
|
1
|
+
{"version":3,"file":"lifeline-row.es.js","sources":["../../../src/ee/signals/lifeline-row.tsx"],"sourcesContent":["import { LifelinePoint } from './lifeline-point';\nimport { formatSnapshotCutoff } from './signal-formatting';\nimport type { ThemeSelection } from './theme-drilldown-data';\nimport { lifelineConnectors, lifelineSegments } from './theme-lifelines-data';\nimport type { ThemeLifeline, ThemeLifelinePoint } from './theme-lifelines-data';\nimport type { ThemeSnapshot, TraceSignalName } from './types';\nimport { nodeColor } from '@/ds/components/SankeyChart';\n\nconst TRACK_HEIGHT = 28;\nconst MAX_BAR_HEIGHT = 22;\nconst MIN_BAR_HEIGHT = 4;\n\nfunction barHeight(share: number) {\n return Math.max(MIN_BAR_HEIGHT, Math.round(share * MAX_BAR_HEIGHT));\n}\n\nfunction pointTitle(snapshot: ThemeSnapshot | undefined, label: string, traceCount: number, share: number) {\n const cutoff = snapshot?.cutoffAt ? formatSnapshotCutoff(snapshot.cutoffAt) : undefined;\n return `${label}${cutoff ? ` · ${cutoff}` : ''} · ${traceCount} traces (${Math.round(share * 100)}%)`;\n}\n\nfunction lifelineArea(segment: ThemeLifelinePoint[], positions: number[]) {\n const firstPoint = segment[0];\n const lastPoint = segment.at(-1);\n if (!firstPoint || !lastPoint) return undefined;\n\n return {\n key: firstPoint.snapshotIndex,\n points: [\n `${positions[firstPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ...segment.map(point => `${positions[point.snapshotIndex]},${TRACK_HEIGHT - 1 - barHeight(point.share)}`),\n `${positions[lastPoint.snapshotIndex]},${TRACK_HEIGHT - 1}`,\n ].join(' '),\n };\n}\n\nexport function LifelineRow({\n row,\n signalName,\n snapshots,\n positions,\n hue,\n onThemeSelect,\n}: {\n row: ThemeLifeline;\n signalName: TraceSignalName;\n snapshots: ThemeSnapshot[];\n positions: number[];\n hue: number;\n onThemeSelect: (selection: ThemeSelection, snapshotIndex: number) => void;\n}) {\n const isPersistent = row.points.length * 2 >= snapshots.length;\n const connectors = lifelineConnectors(row.points);\n const segments = lifelineSegments(row.points);\n const pointY = (point: ThemeLifelinePoint) => TRACK_HEIGHT - 1 - barHeight(point.share);\n\n return (\n <li\n aria-label={`${row.label}: present in ${row.points.length} of ${snapshots.length} landmarks`}\n className={`group hover:bg-surface3 flex items-center gap-3 rounded-md transition-colors ${isPersistent ? '' : 'opacity-55 hover:opacity-100'}`}\n >\n <span\n className=\"text-neutral4 group-hover:text-neutral6 w-52 shrink-0 truncate text-right text-xs\"\n title={row.label}\n >\n {row.label}\n </span>\n <div className=\"border-border1 relative mx-2 h-7 min-w-0 flex-1 border-b\">\n {connectors.length > 0 || segments.length > 0 ? (\n <svg\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-0 size-full\"\n preserveAspectRatio=\"none\"\n viewBox={`0 0 100 ${TRACK_HEIGHT}`}\n >\n {segments.map(segment => {\n const area = lifelineArea(segment, positions);\n if (!area) return undefined;\n return <polygon key={`area-${area.key}`} fill={nodeColor(hue)} fillOpacity={0.14} points={area.points} />;\n })}\n {connectors.map(({ from, to }) => (\n <line\n key={`${from.snapshotIndex}-${to.snapshotIndex}`}\n stroke={nodeColor(hue)}\n strokeOpacity={0.45}\n strokeWidth={1.2}\n vectorEffect=\"non-scaling-stroke\"\n x1={positions[from.snapshotIndex]}\n y1={pointY(from)}\n x2={positions[to.snapshotIndex]}\n y2={pointY(to)}\n />\n ))}\n </svg>\n ) : null}\n {row.points.map(point => {\n const title = pointTitle(snapshots[point.snapshotIndex], row.label, point.traceCount, point.share);\n const themeId = point.themeId;\n return (\n <LifelinePoint\n key={point.snapshotIndex}\n title={title}\n positionPercent={positions[point.snapshotIndex]}\n height={barHeight(point.share)}\n color={nodeColor(hue)}\n onSelect={\n themeId === undefined\n ? undefined\n : () => onThemeSelect({ kind: 'theme', signalName, themeId, label: row.label }, point.snapshotIndex)\n }\n />\n );\n })}\n </div>\n <span className=\"text-neutral3 w-9 shrink-0 font-mono text-[11px] tabular-nums\">\n {row.points.length}/{snapshots.length}\n </span>\n </li>\n );\n}\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,YAAA,GAAe,EAAA;AACrB,MAAM,cAAA,GAAiB,EAAA;AACvB,MAAM,cAAA,GAAiB,CAAA;AAEvB,SAAS,UAAU,KAAA,EAAe;AAChC,EAAA,OAAO,KAAK,GAAA,CAAI,cAAA,EAAgB,KAAK,KAAA,CAAM,KAAA,GAAQ,cAAc,CAAC,CAAA;AACpE;AAEA,SAAS,UAAA,CAAW,QAAA,EAAqC,KAAA,EAAe,UAAA,EAAoB,KAAA,EAAe;AACzG,EAAA,MAAM,SAAS,QAAA,EAAU,QAAA,GAAW,oBAAA,CAAqB,QAAA,CAAS,QAAQ,CAAA,GAAI,MAAA;AAC9E,EAAA,OAAO,CAAA,EAAG,KAAK,CAAA,EAAG,MAAA,GAAS,MAAM,MAAM,CAAA,CAAA,GAAK,EAAE,CAAA,GAAA,EAAM,UAAU,CAAA,SAAA,EAAY,IA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