deepclause-sdk 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/tui.d.ts +9 -0
- package/dist/cli/tui.d.ts.map +1 -1
- package/dist/cli/tui.js +156 -20
- package/dist/cli/tui.js.map +1 -1
- package/dist/runner.d.ts +1 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +240 -188
- package/dist/runner.js.map +1 -1
- package/dist/system/runtime/dml-executor.js +2 -0
- package/dist/system/runtime/dml-executor.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/vendor/swipl-wasm/README.md +253 -0
package/dist/cli/tui.d.ts
CHANGED
|
@@ -68,6 +68,15 @@ export declare class ActivityBuffer {
|
|
|
68
68
|
private handleToolCall;
|
|
69
69
|
private buildActiveToolLines;
|
|
70
70
|
}
|
|
71
|
+
export declare class TaskTracker {
|
|
72
|
+
private readonly entries;
|
|
73
|
+
private readonly activeStack;
|
|
74
|
+
private readonly maxEntries;
|
|
75
|
+
handle(logEvent: ConductorLogEvent): void;
|
|
76
|
+
buildPaneBody(_width: number): string[];
|
|
77
|
+
clear(): void;
|
|
78
|
+
private trim;
|
|
79
|
+
}
|
|
71
80
|
export declare function releaseTuiInputStream(stream: TuiInputStream): void;
|
|
72
81
|
export declare function startTui(workspaceRoot?: string, options?: {
|
|
73
82
|
sandbox?: boolean;
|
package/dist/cli/tui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../../src/cli/tui.ts"],"names":[],"mappings":"AAOA,OAAO,EAAyD,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAO,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EASL,KAAK,iBAAiB,EAGvB,MAAM,gCAAgC,CAAC;A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K,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EACjG,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EACvB,KAAK,EAAE,MAAM,GACZ,CAAC,EAAE,CAWL"}
|
package/dist/cli/tui.js
CHANGED
|
@@ -64,7 +64,7 @@ export class LiveExecutionPrinter {
|
|
|
64
64
|
}
|
|
65
65
|
handle(logEvent) {
|
|
66
66
|
const { event } = logEvent;
|
|
67
|
-
if (event.type === 'usage' || event.type === 'finished') {
|
|
67
|
+
if (event.type === 'usage' || event.type === 'finished' || event.type === 'task_activity') {
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
if (event.type === 'stream') {
|
|
@@ -148,7 +148,7 @@ export class ActivityBuffer {
|
|
|
148
148
|
activeStreamLine = '';
|
|
149
149
|
handle(logEvent) {
|
|
150
150
|
const { event } = logEvent;
|
|
151
|
-
if (event.type === 'usage' || event.type === 'finished') {
|
|
151
|
+
if (event.type === 'usage' || event.type === 'finished' || event.type === 'task_activity') {
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
if (event.type === 'stream') {
|
|
@@ -300,6 +300,74 @@ export class ActivityBuffer {
|
|
|
300
300
|
return lines;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
+
function summarizeStepDescription(raw) {
|
|
304
|
+
const firstLine = raw.split(/\r?\n/)[0] ?? '';
|
|
305
|
+
const trimmed = firstLine.replace(/\s+/g, ' ').trim();
|
|
306
|
+
return trimmed.length > 80 ? trimmed.slice(0, 77) + '\u2026' : trimmed;
|
|
307
|
+
}
|
|
308
|
+
export class TaskTracker {
|
|
309
|
+
entries = [];
|
|
310
|
+
activeStack = [];
|
|
311
|
+
maxEntries = 200;
|
|
312
|
+
handle(logEvent) {
|
|
313
|
+
const { event } = logEvent;
|
|
314
|
+
if (event.type !== 'task_activity')
|
|
315
|
+
return;
|
|
316
|
+
if (event.taskState === 'started' && event.taskId) {
|
|
317
|
+
const depth = this.activeStack.length;
|
|
318
|
+
this.activeStack.push(event.taskId);
|
|
319
|
+
this.entries.push({
|
|
320
|
+
id: event.taskId,
|
|
321
|
+
description: summarizeStepDescription(event.taskDescription ?? ''),
|
|
322
|
+
state: 'started',
|
|
323
|
+
depth,
|
|
324
|
+
startedAt: Date.now(),
|
|
325
|
+
});
|
|
326
|
+
this.trim();
|
|
327
|
+
}
|
|
328
|
+
else if ((event.taskState === 'completed' || event.taskState === 'failed') && event.taskId) {
|
|
329
|
+
const idx = this.entries.findIndex(e => e.id === event.taskId);
|
|
330
|
+
if (idx >= 0) {
|
|
331
|
+
this.entries[idx].state = event.taskState;
|
|
332
|
+
this.entries[idx].completedAt = Date.now();
|
|
333
|
+
}
|
|
334
|
+
const stackIdx = this.activeStack.lastIndexOf(event.taskId);
|
|
335
|
+
if (stackIdx >= 0) {
|
|
336
|
+
this.activeStack.splice(stackIdx, 1);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
buildPaneBody(_width) {
|
|
341
|
+
if (this.entries.length === 0) {
|
|
342
|
+
return ['No steps yet.', 'Step activity renders here.'];
|
|
343
|
+
}
|
|
344
|
+
const lines = [];
|
|
345
|
+
for (const entry of this.entries) {
|
|
346
|
+
const indent = ' '.repeat(entry.depth);
|
|
347
|
+
let marker;
|
|
348
|
+
if (entry.state === 'started') {
|
|
349
|
+
marker = '>';
|
|
350
|
+
}
|
|
351
|
+
else if (entry.state === 'completed') {
|
|
352
|
+
marker = '\u2713';
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
marker = '\u2717';
|
|
356
|
+
}
|
|
357
|
+
lines.push(`${indent}${marker} ${entry.description}`);
|
|
358
|
+
}
|
|
359
|
+
return lines;
|
|
360
|
+
}
|
|
361
|
+
clear() {
|
|
362
|
+
this.entries.length = 0;
|
|
363
|
+
this.activeStack.length = 0;
|
|
364
|
+
}
|
|
365
|
+
trim() {
|
|
366
|
+
if (this.entries.length > this.maxEntries) {
|
|
367
|
+
this.entries.splice(0, this.entries.length - this.maxEntries);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
303
371
|
export function releaseTuiInputStream(stream) {
|
|
304
372
|
if (stream.isTTY && typeof stream.setRawMode === 'function') {
|
|
305
373
|
stream.setRawMode(false);
|
|
@@ -376,6 +444,7 @@ class FullscreenTui {
|
|
|
376
444
|
commands = [];
|
|
377
445
|
activityBySessionId = new Map();
|
|
378
446
|
ephemeralMessagesBySessionId = new Map();
|
|
447
|
+
taskTrackerBySessionId = new Map();
|
|
379
448
|
focusedPane = 'messages';
|
|
380
449
|
uiMode = 'command';
|
|
381
450
|
menuReturnMode = 'command';
|
|
@@ -389,12 +458,14 @@ class FullscreenTui {
|
|
|
389
458
|
sessions: 0,
|
|
390
459
|
messages: 0,
|
|
391
460
|
process: 0,
|
|
461
|
+
tasks: 0,
|
|
392
462
|
context: 0,
|
|
393
463
|
};
|
|
394
464
|
lastPaneMetrics = {
|
|
395
465
|
sessions: { maxStart: 0, viewportLines: 0, maxStartIsExact: true },
|
|
396
466
|
messages: { maxStart: 0, viewportLines: 0, maxStartIsExact: true },
|
|
397
467
|
process: { maxStart: 0, viewportLines: 0, maxStartIsExact: true },
|
|
468
|
+
tasks: { maxStart: 0, viewportLines: 0, maxStartIsExact: true },
|
|
398
469
|
context: { maxStart: 0, viewportLines: 0, maxStartIsExact: true },
|
|
399
470
|
};
|
|
400
471
|
currentPreview = null;
|
|
@@ -615,11 +686,16 @@ class FullscreenTui {
|
|
|
615
686
|
paneWidth = widths.right;
|
|
616
687
|
paneTop = 0;
|
|
617
688
|
break;
|
|
618
|
-
case '
|
|
689
|
+
case 'tasks':
|
|
619
690
|
paneLeft = widths.left + 1 + widths.center + 1;
|
|
620
691
|
paneWidth = widths.right;
|
|
621
692
|
paneTop = rightHeights.process;
|
|
622
693
|
break;
|
|
694
|
+
case 'context':
|
|
695
|
+
paneLeft = widths.left + 1 + widths.center + 1;
|
|
696
|
+
paneWidth = widths.right;
|
|
697
|
+
paneTop = rightHeights.process + rightHeights.tasks;
|
|
698
|
+
break;
|
|
623
699
|
}
|
|
624
700
|
if (screenCol < paneLeft + 2 || screenCol > paneLeft + paneWidth - 1)
|
|
625
701
|
return null;
|
|
@@ -691,11 +767,16 @@ class FullscreenTui {
|
|
|
691
767
|
paneWidth = widths.right;
|
|
692
768
|
paneTop = 0;
|
|
693
769
|
break;
|
|
694
|
-
case '
|
|
770
|
+
case 'tasks':
|
|
695
771
|
paneLeft = widths.left + 1 + widths.center + 1;
|
|
696
772
|
paneWidth = widths.right;
|
|
697
773
|
paneTop = rightHeights.process;
|
|
698
774
|
break;
|
|
775
|
+
case 'context':
|
|
776
|
+
paneLeft = widths.left + 1 + widths.center + 1;
|
|
777
|
+
paneWidth = widths.right;
|
|
778
|
+
paneTop = rightHeights.process + rightHeights.tasks;
|
|
779
|
+
break;
|
|
699
780
|
}
|
|
700
781
|
const innerDisplayStart = paneLeft + 1;
|
|
701
782
|
const innerDisplayEnd = paneLeft + paneWidth - 2;
|
|
@@ -738,6 +819,8 @@ class FullscreenTui {
|
|
|
738
819
|
return 'messages';
|
|
739
820
|
if (contentRow <= rightHeights.process)
|
|
740
821
|
return 'process';
|
|
822
|
+
if (contentRow <= rightHeights.process + rightHeights.tasks)
|
|
823
|
+
return 'tasks';
|
|
741
824
|
return 'context';
|
|
742
825
|
}
|
|
743
826
|
menuIndexAtColumn(column) {
|
|
@@ -1286,6 +1369,7 @@ class FullscreenTui {
|
|
|
1286
1369
|
onEvent: (event) => {
|
|
1287
1370
|
this.manageToolAbortSignal(event.event);
|
|
1288
1371
|
activity.handle(event);
|
|
1372
|
+
this.taskTrackerFor(sessionId).handle(event);
|
|
1289
1373
|
this.updatePreviewFromEvent(event);
|
|
1290
1374
|
this.requestRender();
|
|
1291
1375
|
},
|
|
@@ -1347,6 +1431,7 @@ class FullscreenTui {
|
|
|
1347
1431
|
onEvent: (event) => {
|
|
1348
1432
|
this.manageToolAbortSignal(event.event);
|
|
1349
1433
|
activity.handle(event);
|
|
1434
|
+
this.taskTrackerFor(sessionId).handle(event);
|
|
1350
1435
|
this.updatePreviewFromEvent(event);
|
|
1351
1436
|
this.requestRender();
|
|
1352
1437
|
},
|
|
@@ -1416,6 +1501,7 @@ class FullscreenTui {
|
|
|
1416
1501
|
onEvent: (event) => {
|
|
1417
1502
|
this.manageToolAbortSignal(event.event);
|
|
1418
1503
|
activity.handle(event);
|
|
1504
|
+
this.taskTrackerFor(sessionId).handle(event);
|
|
1419
1505
|
this.updatePreviewFromEvent(event);
|
|
1420
1506
|
this.requestRender();
|
|
1421
1507
|
},
|
|
@@ -1482,6 +1568,7 @@ class FullscreenTui {
|
|
|
1482
1568
|
onEvent: (event) => {
|
|
1483
1569
|
this.manageToolAbortSignal(event.event);
|
|
1484
1570
|
activity.handle(event);
|
|
1571
|
+
this.taskTrackerFor(sessionId).handle(event);
|
|
1485
1572
|
this.updatePreviewFromEvent(event);
|
|
1486
1573
|
this.requestRender();
|
|
1487
1574
|
},
|
|
@@ -1550,6 +1637,7 @@ class FullscreenTui {
|
|
|
1550
1637
|
signal: this.currentAbortController.signal,
|
|
1551
1638
|
onEvent: (event) => {
|
|
1552
1639
|
activity.handle(event);
|
|
1640
|
+
this.taskTrackerFor(sessionId).handle(event);
|
|
1553
1641
|
this.requestRender();
|
|
1554
1642
|
},
|
|
1555
1643
|
});
|
|
@@ -1670,7 +1758,7 @@ class FullscreenTui {
|
|
|
1670
1758
|
this.scrollFocusedPane(offset < 0 ? 'up' : 'down', 1);
|
|
1671
1759
|
}
|
|
1672
1760
|
cyclePaneFocus(direction) {
|
|
1673
|
-
const order = ['sessions', 'messages', 'process', 'context'];
|
|
1761
|
+
const order = ['sessions', 'messages', 'process', 'tasks', 'context'];
|
|
1674
1762
|
const currentIndex = order.indexOf(this.focusedPane);
|
|
1675
1763
|
const nextIndex = (currentIndex + direction + order.length) % order.length;
|
|
1676
1764
|
this.focusedPane = order[nextIndex];
|
|
@@ -1792,6 +1880,7 @@ class FullscreenTui {
|
|
|
1792
1880
|
{ id: 'view.focus.sessions', label: 'Focus Sessions Pane', description: 'Focus the session list pane.' },
|
|
1793
1881
|
{ id: 'view.focus.messages', label: 'Focus Messages Pane', description: 'Focus the conversation history pane.' },
|
|
1794
1882
|
{ id: 'view.focus.process', label: 'Focus Execution Pane', description: 'Focus the live execution log pane.' },
|
|
1883
|
+
{ id: 'view.focus.tasks', label: 'Focus Tasks Pane', description: 'Focus the step tracker pane.' },
|
|
1795
1884
|
{ id: 'view.focus.context', label: 'Focus Context Pane', description: 'Focus the session context and token usage pane.' },
|
|
1796
1885
|
{ id: 'view.follow', label: 'Follow Focused Pane', description: 'Jump back to the newest visible content in the active pane.' },
|
|
1797
1886
|
{ id: 'view.palette', label: 'Open Action Palette', description: 'Search all menu actions from one picker.', shortcut: 'Ctrl+P' },
|
|
@@ -1909,6 +1998,7 @@ class FullscreenTui {
|
|
|
1909
1998
|
case 'view.focus.sessions':
|
|
1910
1999
|
case 'view.focus.messages':
|
|
1911
2000
|
case 'view.focus.process':
|
|
2001
|
+
case 'view.focus.tasks':
|
|
1912
2002
|
case 'view.focus.context': {
|
|
1913
2003
|
const pane = actionId.slice('view.focus.'.length);
|
|
1914
2004
|
this.focusedPane = pane;
|
|
@@ -2902,6 +2992,14 @@ class FullscreenTui {
|
|
|
2902
2992
|
this.activityBySessionId.set(key, created);
|
|
2903
2993
|
return created;
|
|
2904
2994
|
}
|
|
2995
|
+
taskTrackerFor(sessionId) {
|
|
2996
|
+
let tracker = this.taskTrackerBySessionId.get(sessionId);
|
|
2997
|
+
if (!tracker) {
|
|
2998
|
+
tracker = new TaskTracker();
|
|
2999
|
+
this.taskTrackerBySessionId.set(sessionId, tracker);
|
|
3000
|
+
}
|
|
3001
|
+
return tracker;
|
|
3002
|
+
}
|
|
2905
3003
|
async persistShellCommandResult(command, result) {
|
|
2906
3004
|
let sessionId = this.selectedSessionId;
|
|
2907
3005
|
if (!sessionId) {
|
|
@@ -2939,6 +3037,7 @@ class FullscreenTui {
|
|
|
2939
3037
|
const sessionsPane = this.buildPaneView('sessions', 'Sessions', widths.left, contentHeight);
|
|
2940
3038
|
const messagesPane = this.buildPaneView('messages', 'Messages', widths.center, contentHeight);
|
|
2941
3039
|
const processPane = this.buildPaneView('process', 'Execution', widths.right, rightHeights.process);
|
|
3040
|
+
const tasksPane = this.buildPaneView('tasks', 'Tasks', widths.right, rightHeights.tasks);
|
|
2942
3041
|
const contextPane = this.buildPaneView('context', 'Context', widths.right, rightHeights.context);
|
|
2943
3042
|
const workspaceView = this.uiMode === 'command'
|
|
2944
3043
|
? null
|
|
@@ -2955,9 +3054,16 @@ class FullscreenTui {
|
|
|
2955
3054
|
}
|
|
2956
3055
|
else {
|
|
2957
3056
|
for (let index = 0; index < contentHeight; index += 1) {
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
3057
|
+
let rightLine;
|
|
3058
|
+
if (index < rightHeights.process) {
|
|
3059
|
+
rightLine = processPane[index];
|
|
3060
|
+
}
|
|
3061
|
+
else if (index < rightHeights.process + rightHeights.tasks) {
|
|
3062
|
+
rightLine = tasksPane[index - rightHeights.process];
|
|
3063
|
+
}
|
|
3064
|
+
else {
|
|
3065
|
+
rightLine = contextPane[index - rightHeights.process - rightHeights.tasks];
|
|
3066
|
+
}
|
|
2961
3067
|
lines.push(`${sessionsPane[index]}${gap}${messagesPane[index]}${gap}${rightLine}`);
|
|
2962
3068
|
}
|
|
2963
3069
|
}
|
|
@@ -3129,6 +3235,12 @@ class FullscreenTui {
|
|
|
3129
3235
|
'Use /cancel to abort the current execution.',
|
|
3130
3236
|
];
|
|
3131
3237
|
}
|
|
3238
|
+
buildTasksPaneBody() {
|
|
3239
|
+
const tracker = this.taskTrackerFor(this.selectedSessionId);
|
|
3240
|
+
const columns = output.columns ?? 120;
|
|
3241
|
+
const widths = computePaneWidths(columns);
|
|
3242
|
+
return tracker.buildPaneBody(widths.right);
|
|
3243
|
+
}
|
|
3132
3244
|
buildContextPaneBody() {
|
|
3133
3245
|
if (!this.sessionDetail) {
|
|
3134
3246
|
return ['No session selected.'];
|
|
@@ -3418,6 +3530,8 @@ class FullscreenTui {
|
|
|
3418
3530
|
return this.buildMessagesPaneBody();
|
|
3419
3531
|
case 'process':
|
|
3420
3532
|
return this.buildProcessPaneBody({ tailLineLimit: MAX_ACTIVITY_LINES });
|
|
3533
|
+
case 'tasks':
|
|
3534
|
+
return this.buildTasksPaneBody();
|
|
3421
3535
|
case 'context':
|
|
3422
3536
|
return this.buildContextPaneBody();
|
|
3423
3537
|
}
|
|
@@ -4524,17 +4638,23 @@ function computePaneWidths(columns) {
|
|
|
4524
4638
|
return { left, center, right };
|
|
4525
4639
|
}
|
|
4526
4640
|
function computeRightPaneHeights(totalHeight) {
|
|
4527
|
-
if (totalHeight <=
|
|
4528
|
-
return { process: Math.max(1, totalHeight -
|
|
4529
|
-
}
|
|
4530
|
-
let process = Math.max(
|
|
4531
|
-
let
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4641
|
+
if (totalHeight <= 12) {
|
|
4642
|
+
return { process: Math.max(1, totalHeight - 2), tasks: 1, context: 1 };
|
|
4643
|
+
}
|
|
4644
|
+
let process = Math.max(6, Math.floor(totalHeight * 0.40));
|
|
4645
|
+
let tasks = Math.max(4, Math.floor(totalHeight * 0.25));
|
|
4646
|
+
let context = totalHeight - process - tasks;
|
|
4647
|
+
if (context < 4) {
|
|
4648
|
+
const deficit = 4 - context;
|
|
4649
|
+
process = Math.max(4, process - deficit);
|
|
4650
|
+
context = totalHeight - process - tasks;
|
|
4651
|
+
}
|
|
4652
|
+
if (context < 4) {
|
|
4653
|
+
const deficit = 4 - context;
|
|
4654
|
+
tasks = Math.max(3, tasks - deficit);
|
|
4655
|
+
context = totalHeight - process - tasks;
|
|
4656
|
+
}
|
|
4657
|
+
return { process, tasks, context };
|
|
4538
4658
|
}
|
|
4539
4659
|
function buildPane(title, body, width, height, kind, active = false) {
|
|
4540
4660
|
if (height <= 0) {
|
|
@@ -4885,8 +5005,20 @@ function renderWindowBody(text, innerWidth, kind) {
|
|
|
4885
5005
|
return `${border}${paint(content, ANSI.yellow, ANSI.bgBlue, ANSI.bold)}${border}`;
|
|
4886
5006
|
}
|
|
4887
5007
|
if (normalized.startsWith('task') || normalized.startsWith('skill')) {
|
|
4888
|
-
return `${border}${paint(content, ANSI.brightWhite, ANSI.bgBlue, ANSI.bold)}
|
|
5008
|
+
return `${border}${paint(content, ANSI.brightWhite, ANSI.bgBlue, ANSI.bold)}`;
|
|
5009
|
+
}
|
|
5010
|
+
}
|
|
5011
|
+
if (kind === 'tasks') {
|
|
5012
|
+
if (text.startsWith('>')) {
|
|
5013
|
+
return `${border}${paint(content, ANSI.brightCyan, ANSI.bgBlue, ANSI.bold)}${border}`;
|
|
5014
|
+
}
|
|
5015
|
+
if (text.startsWith('\u2713')) {
|
|
5016
|
+
return `${border}${paint(content, ANSI.green, ANSI.bgBlue)}${border}`;
|
|
5017
|
+
}
|
|
5018
|
+
if (text.startsWith('\u2717')) {
|
|
5019
|
+
return `${border}${paint(content, ANSI.red, ANSI.bgBlue)}${border}`;
|
|
4889
5020
|
}
|
|
5021
|
+
return `${border}${paint(content, ANSI.white, ANSI.bgBlue)}${border}`;
|
|
4890
5022
|
}
|
|
4891
5023
|
if (normalized === 'task memory' ||
|
|
4892
5024
|
normalized === 'assistant memory' ||
|
|
@@ -4915,6 +5047,8 @@ function paneDisplayName(kind) {
|
|
|
4915
5047
|
return 'Messages';
|
|
4916
5048
|
case 'process':
|
|
4917
5049
|
return 'Execution';
|
|
5050
|
+
case 'tasks':
|
|
5051
|
+
return 'Tasks';
|
|
4918
5052
|
case 'context':
|
|
4919
5053
|
return 'Context';
|
|
4920
5054
|
}
|
|
@@ -4929,6 +5063,8 @@ function paneDimensionsForKind(kind, columns, rows) {
|
|
|
4929
5063
|
return { width: widths.center, height: Math.max(1, rows - 3) };
|
|
4930
5064
|
case 'process':
|
|
4931
5065
|
return { width: widths.right, height: rightHeights.process };
|
|
5066
|
+
case 'tasks':
|
|
5067
|
+
return { width: widths.right, height: rightHeights.tasks };
|
|
4932
5068
|
case 'context':
|
|
4933
5069
|
return { width: widths.right, height: rightHeights.context };
|
|
4934
5070
|
}
|