mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
Add telemetry for entering linear mode (#8263)
Standard disclaimer: Telemetry only applies on cloud builds ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8263-Add-telemetry-for-entering-linear-mode-2f16d73d3650819ea53efeeb562ea095) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1235,8 +1235,11 @@ export function useCoreCommands(): ComfyCommand[] {
|
||||
id: 'Comfy.ToggleLinear',
|
||||
icon: 'pi pi-database',
|
||||
label: 'Toggle Simple Mode',
|
||||
function: () => {
|
||||
function: (metadata?: Record<string, unknown>) => {
|
||||
const source =
|
||||
typeof metadata?.source === 'string' ? metadata.source : 'keybind'
|
||||
const newMode = !canvasStore.linearMode
|
||||
if (newMode) useTelemetry()?.trackEnterLinear({ source })
|
||||
app.rootGraph.extra.linearMode = newMode
|
||||
workflowStore.activeWorkflow?.changeTracker?.checkState()
|
||||
canvasStore.linearMode = newMode
|
||||
|
||||
Reference in New Issue
Block a user