feat: Enhance team messaging system with new operations and data handling

- Added support for new message type 'state_update' in TeamMessageType.
- Updated TeamMessageFeed component to handle both legacy and new reference formats.
- Modified CLI options to clarify usage and added new commands for broadcasting messages and retrieving role states.
- Implemented new command 'get_state' to read role state from meta.json.
- Enhanced team message logging to auto-generate summaries and handle structured data.
- Improved backward compatibility by enriching team metadata from legacy files.
- Refactored message handling functions to streamline operations and improve clarity.
This commit is contained in:
catlog22
2026-03-03 16:11:57 +08:00
parent 628578b2bb
commit a7ed0365f7
7 changed files with 409 additions and 269 deletions

View File

@@ -90,11 +90,11 @@ function MessageRow({ msg }: { msg: TeamMessage }) {
{/* Summary */}
<p className="text-xs text-foreground/80">{msg.summary}</p>
{/* Ref link */}
{msg.ref && (
{/* Ref link (supports both legacy msg.ref and new data.ref) */}
{(msg.ref || (msg.data?.ref as string)) && (
<div className="flex items-center gap-1 text-[10px] text-muted-foreground">
<FileText className="w-3 h-3" />
<span className="font-mono truncate">{msg.ref}</span>
<span className="font-mono truncate">{msg.ref || (msg.data?.ref as string)}</span>
</div>
)}

View File

@@ -26,6 +26,7 @@ export type TeamMessageType =
| 'fix_required'
| 'error'
| 'shutdown'
| 'state_update'
| 'message';
export interface TeamMember {
@@ -49,6 +50,8 @@ export interface TeamSummaryExtended extends TeamSummary {
updated_at: string;
archived_at?: string;
pipeline_mode?: string;
pipeline_stages?: string[];
role_state?: Record<string, Record<string, unknown>>;
memberCount: number;
members: string[]; // Always provided by backend
}