@e-llm-studio/watch-me-work

中文文档
0.0.30发布于 2026/11/02MITTypeScriptESM + CJS零依赖近 30 天下载 2637

Reusable React component for visualizing multi-agent reasoning progress.

原始使用文档
文档目录10 节
  1. Installation
  2. Usage
  3. Props
  4. ThinkingResponseData shape
  5. Full Example
  6. Behaviour
  7. Styling
  8. Peer Dependencies
  9. Repository
  10. License

@e-llm-studio/watch-me-work

A React component library that renders a live, animated view of multi-agent orchestration — showing each agent's thinking steps, streaming status, and time taken in a collapsible accordion UI.


Installation

npm install @e-llm-studio/watch-me-work

Usage

import { WatchMeWork } from '@e-llm-studio/watch-me-work';

<WatchMeWork
  orchestratorAndAgentsMessages={message?.orchestratorAndAgentsMessages}
  isStreamEnd={isStreamEnd}
  finalTimeTaken={message?.finalTimeTaken}
/>

Props

PropTypeRequiredDescription
orchestratorAndAgentsMessagesThinkingResponseData[]✅ YesArray of agent messages to render as steps
isStreamEndboolean✅ YesWhether the stream has finished. Controls step finalization and timer stop
finalTimeTakennumber✅ YesTotal time taken (in sec) displayed after stream ends
thinkingStartTimenumber | null❌ OptionalTimestamp (ms) when thinking started. Used for elapsed timer
streamEndTimenumber | null❌ OptionalTimestamp (ms) when the stream ended
storeTimenumber❌ OptionalTimestamp (in sec) used for storage-related timing metrics

ThinkingResponseData shape

Each item in orchestratorAndAgentsMessages should conform to:

interface ThinkingResponseData {
  responseFrom: string;         // Agent or orchestrator name
  responseMessage?: string;     // Optional message string
  header_message: string;       // Step label shown in the accordion header
  finalResponseStatus: boolean; // Whether this step has completed
  responsedata?: string;        // Markdown content shown in the expanded step body
}

Full Example

import { WatchMeWork } from '@e-llm-studio/watch-me-work';

const agentMessages = [
  {
    responseFrom: 'orchestrator',
    header_message: 'Analyzing your request...',
    finalResponseStatus: false,
    responsedata: '',
  },
  {
    responseFrom: 'search-agent',
    header_message: 'Fetching relevant documents',
    finalResponseStatus: true,
    responsedata: '**Found 3 relevant sources.** Summarizing content now.',
  },
];

export default function ChatMessage() {
  return (
    <WatchMeWork
      orchestratorAndAgentsMessages={agentMessages}
      isStreamEnd={false}
      finalTimeTaken={0}
      thinkingStartTime={Date.now()}
      streamEndTime={null}
      storeTime={undefined}
    />
  );
}

Behaviour

  • While isStreamEnd is false, an elapsed timer runs showing how long the agents have been working.
  • Each step renders as a collapsible accordion row with a shimmer animation on the header label while the step is in progress.
  • When finalResponseStatus is true on a step, the header transitions to a gradient style indicating completion.
  • When isStreamEnd becomes true, the total time taken (finalTimeTaken) is displayed and all timers stop.

Styling

WatchMeWork is a highly customizable component for rendering AI reasoning flows, including:

🧠 Thinking indicator 📄 Step detail view (accordion) 🔄 Multi-step agent timeline (Watch Me Work)

You can fully control its UI using the customStyles prop.

🧩 Basic Usage

<WatchMeWork
  orchestratorAndAgentsMessages={data}
  isStreamEnd={true}
  finalTimeTaken={1200}
  customStyles={styles}
/>

🎨 Custom Styles customStyles = { container?: CSSProperties, stepDetail?: StepDetailStyles, agentSteps?: AgentStepsStyles }

🟦 1. Container Styling

Controls the outer wrapper of the component.

container: {
  border: '1px solid #E4E7EC',
  padding: '8px',
  borderRadius: '12px',
  background: '#F9FAFB'
}

🟣 2. Step Detail View (Accordion)

Used when displaying a single reasoning step.

Structure stepDetail: { wrapper?: CSSProperties header?: CSSProperties stepLabel?: CSSProperties body?: CSSProperties bodyInner?: CSSProperties scroll?: CSSProperties chevron?: CSSProperties markdownInner?: CSSProperties chevronSize?: number bodyMaxHeight?: string mdCustomStyles?: { p?: CSSProperties code?: CSSProperties pre?: CSSProperties strong?: CSSProperties } } Example

stepDetail: {
  header: {
    background: '#7F56D9',
    color: '#FFFFFF',
    padding: '6px 10px'
  },
  stepLabel: {
    color: '#FFFFFF', 
    fontWeight: 600
  },
  body: {
    background: '#F4EBFF'
  },
  bodyInner: {
    borderRadius: '10px'
  },
  scroll: {
    maxHeight: '300px'
  },
    mdCustomStyles: {
    p: {
      color: '#DC2626'
    },
    code: {
      color: '#2563EB',
      background: '#000'
    },
    pre: {
      background: '#111827',
      color: '#F9FAFB'
    }
  }
}

🟢 3. Agent Steps View (Timeline)

Used when displaying multiple reasoning steps.

Structure agentSteps: { wrapper?: CSSProperties header?: CSSProperties headerInner?: CSSProperties label?: CSSProperties stepList?: CSSProperties stepListInner?: CSSProperties stepItem?: StepItemStyles }

Example

agentSteps: {
  wrapper: {
    border: '1px solid #D1FADF',
    borderRadius: '10px'
  },
  header: {
    background: '#ECFDF5',
    padding: '8px'
  },
  label: {
    color: '#065F46',
    fontWeight: 600
  },
  stepList: {
    background: '#F0FFF5'
  }
}

🧱 4. Step Item (Deep Customization)

Controls individual steps inside the timeline.

Structure stepItem: { stepWrapper?: CSSProperties stepRow?: CSSProperties spineCol?: CSSProperties spineLine?: CSSProperties contentCol?: CSSProperties headerRow?: CSSProperties headerLabel?: CSSProperties contentBox?: CSSProperties markdownBox?: CSSProperties markdownInner?: CSSProperties showMoreBtn?: CSSProperties Dot?: CSSProperties mdExpandedCustomStyles?: { p?: CSSProperties code?: CSSProperties pre?: CSSProperties } } Example


stepItem: {
  headerLabel: {
    color: '#101828'
  },
  spineLine: {
    background: '#22C55E'
  },
  markdownBox: {
    background: '#F9FAFB'
  },
  markdownInner: {
    color: '#667085'
  },
  showMoreBtn: {
    color: '#2563EB'
  },
  Dot: {
    width: '10px',
    backgroundColor: '#22C55E'
  },
    mdExpandedCustomStyles: {
    p: {
      color: '#7C3AED'
    },
    code: {
      color: '#06B6D4',
      background: '#000'
    },
    pre: {
      background: '#020617',
      color: '#E2E8F0'
    }
  }
}

🔥 Full Example


const styles = {
  container: {
    border: '2px solid #007AFF',
    background: '#EAF2FF',
    padding: '10px'
  },

  stepDetail: {
    header: {
      background: '#AF52DE',
      color: '#fff'
    },
    stepLabel: {
      color: '#fff'
    },
    body: {
      background: '#F9F0FF'
    },
    mdCustomStyles: {
      p: { color: 'red' },
      code: { color: 'blue' },
      pre: { background: 'black', color: 'white' }
    }
  },

  agentSteps: {
    wrapper: {
      border: '2px solid #34C759'
    },
    label: {
      color: '#065F46'
    },
    stepItem: {
      headerLabel: {
        color: '#101828'
      }
    }
  }
};

Peer Dependencies

{
  "react": ">=16.8.0 <19.0.0",
  "react-dom": "^17.0.2"
}

Repository

github.com/Techolution/e-llm-studio-lib


License

MIT © Techolution

版本与发布记录

@e-llm-studio/watch-me-work 共发布 30 个版本,首次发布于 2026/03/17;过去 12 个月发布了 30 个版本。

版本发布日期距今
0.0.30latest2026/11/0211 天前
0.0.292026/10/2717 天前
0.0.282026/06/164 个月前
0.0.272026/06/115 个月前
0.0.262026/04/087 个月前
0.0.252026/04/077 个月前

关于 @e-llm-studio/watch-me-work 的常见问题

@e-llm-studio/watch-me-work 是什么?

Reusable React component for visualizing multi-agent reasoning progress.

如何安装 @e-llm-studio/watch-me-work?

在项目目录运行 npm install @e-llm-studio/watch-me-work,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16.8.0 <19.0.0)、react-dom(>=16.8.0 <19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@e-llm-studio/watch-me-work 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@e-llm-studio/watch-me-work 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@e-llm-studio/watch-me-work 可以商用吗?

@e-llm-studio/watch-me-work 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@e-llm-studio/watch-me-work 的下载量有多少?

根据 npm 官方下载统计,@e-llm-studio/watch-me-work 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,637 次,日均约 88 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@e-llm-studio/watch-me-work 还在维护吗?

最新版本 0.0.30 发布于 2026/11/02(11 天前);至今共发布 30 个版本,其中过去 12 个月发布了 30 个;首次发布于 2026/03/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。