MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / makeViewer

Function makeViewer

apps/kimi-code/test/tui/task-output-viewer.test.ts:54–70  ·  view source on GitHub ↗
(opts: {
  output: string;
  taskInfo?: BackgroundTaskInfo;
  rows?: number;
  columns?: number;
  onClose?: () => void;
})

Source from the content-addressed store, hash-verified

52}
53
54function makeViewer(opts: {
55 output: string;
56 taskInfo?: BackgroundTaskInfo;
57 rows?: number;
58 columns?: number;
59 onClose?: () => void;
60}): TaskOutputViewer {
61 return new TaskOutputViewer(
62 {
63 taskId: opts.taskInfo?.taskId ?? 'bash-aaaaaaaa',
64 info: opts.taskInfo ?? info(),
65 output: opts.output,
66 onClose: opts.onClose ?? (() => {}),
67 },
68 fakeTerminal(opts.rows ?? 30, opts.columns ?? 120),
69 );
70}
71
72describe('TaskOutputViewer — rendering', () => {
73 it('fills exactly terminal.rows lines', () => {

Callers 1

Calls 2

infoFunction · 0.70
fakeTerminalFunction · 0.70

Tested by

no test coverage detected