mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-27 01:19:25 +08:00
feat(panel): add single-line top models to client sources and fast scope=conversation session switching
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
formatConversationMeta,
|
||||
normalizeClientUpdateMode,
|
||||
resolveHostRouteMatch,
|
||||
selectConversation,
|
||||
telemetryStore,
|
||||
triggerPluginUpdate,
|
||||
} from '../../store/telemetryStore.js';
|
||||
@@ -33,8 +34,7 @@ export const TopSessionHeader = defineComponent({
|
||||
options: [{ value: '', label: t('header.followLatest') }],
|
||||
onUpdateModelValue: (nextConvId) => {
|
||||
uiStore.setState({ selectedAgentScope: 'all', ctxInspectorAgentId: 'auto' });
|
||||
telemetryStore.setState({ selectedConversationId: nextConvId });
|
||||
fetchTelemetry({ force: false });
|
||||
void selectConversation(nextConvId);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ import {
|
||||
normalizeClientUpdateMode,
|
||||
normalizeClientWindowMountMode,
|
||||
resolveScopedConversation,
|
||||
selectConversation,
|
||||
startAsyncTelemetryLoop,
|
||||
stopAsyncTelemetryLoop,
|
||||
telemetryStore,
|
||||
@@ -1086,8 +1087,7 @@ export function mountWindowOverlay() {
|
||||
selectedAgentScope: 'all',
|
||||
ctxInspectorAgentId: 'auto',
|
||||
});
|
||||
telemetryStore.setState({ selectedConversationId: cascadeId });
|
||||
void fetchTelemetry({ force: false });
|
||||
void selectConversation(cascadeId);
|
||||
setMultiOpen(false);
|
||||
setPopoverOpen(true);
|
||||
}
|
||||
@@ -2567,13 +2567,12 @@ export function mountWindowOverlay() {
|
||||
if (currentRouteId === lastObservedRouteId) return;
|
||||
lastObservedRouteId = currentRouteId;
|
||||
const st = telemetryStore.getState();
|
||||
const patch = { hostRouteConversationId: currentRouteId };
|
||||
if (currentRouteId && st.selectedConversationId && st.selectedConversationId !== currentRouteId) {
|
||||
patch.selectedConversationId = '';
|
||||
}
|
||||
const nextSelectedId =
|
||||
currentRouteId && st.selectedConversationId && st.selectedConversationId !== currentRouteId
|
||||
? ''
|
||||
: st.selectedConversationId;
|
||||
uiStore.setState({ selectedAgentScope: 'all', ctxInspectorAgentId: 'auto' });
|
||||
telemetryStore.setState(patch);
|
||||
void fetchTelemetry({ force: false });
|
||||
void selectConversation(nextSelectedId, { hostRouteConversationId: currentRouteId });
|
||||
}
|
||||
|
||||
const onDocMouseDown = (e) => {
|
||||
|
||||
@@ -25,8 +25,8 @@ import { createSvgIcon } from '../../icons/SvgIcon.js';
|
||||
import { getEffectiveLocale, t } from '../../i18n/index.js';
|
||||
import {
|
||||
extractHostRouteCascadeId,
|
||||
fetchTelemetry,
|
||||
resolveScopedConversation,
|
||||
selectConversation,
|
||||
telemetryStore,
|
||||
} from '../../store/telemetryStore.js';
|
||||
import { uiStore } from '../../store/uiStore.js';
|
||||
@@ -499,8 +499,7 @@ export const LiveActivityWidget = defineComponent({
|
||||
onSelectSession(item.cascadeId);
|
||||
} else if (item.cascadeId && item.cascadeId !== 'current') {
|
||||
uiStore.setState({ selectedAgentScope: 'all', ctxInspectorAgentId: 'auto' });
|
||||
telemetryStore.setState({ selectedConversationId: item.cascadeId });
|
||||
fetchTelemetry({ force: false });
|
||||
void selectConversation(item.cascadeId);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user