fix(team): resolve TypeScript errors in team collaboration module
- Remove unused imports and variables in Team components - Fix CollaborationEvent type import in useTeamEvents - Add proper type guards for Hand status in gatewayStore - Fix Session status type compatibility in gateway-client - Remove unused getGatewayClient import from teamStore - Handle unknown payload types in TeamCollaborationView Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,6 @@ import type {
|
||||
TeamMemberRole,
|
||||
DevQALoop,
|
||||
DevQALoopState,
|
||||
CollaborationPattern,
|
||||
CreateTeamRequest,
|
||||
AddTeamTaskRequest,
|
||||
TeamMetrics,
|
||||
@@ -24,7 +23,6 @@ import type {
|
||||
ReviewFeedback,
|
||||
TaskDeliverable,
|
||||
} from '../types/team';
|
||||
import { getGatewayClient } from '../lib/gateway-client';
|
||||
|
||||
// === Store State ===
|
||||
|
||||
@@ -136,7 +134,6 @@ export const useTeamStore = create<TeamStoreState>((set, get) => ({
|
||||
loadTeams: async () => {
|
||||
set({ isLoading: true, error: null });
|
||||
try {
|
||||
const client = getGatewayClient();
|
||||
// For now, load from localStorage until API is available
|
||||
const stored = localStorage.getItem('zclaw-teams');
|
||||
const teams: Team[] = stored ? JSON.parse(stored) : [];
|
||||
@@ -150,7 +147,7 @@ export const useTeamStore = create<TeamStoreState>((set, get) => ({
|
||||
set({ isLoading: true, error: null });
|
||||
try {
|
||||
const now = new Date().toISOString();
|
||||
const members: TeamMember[] = request.memberAgents.map((m, index) => ({
|
||||
const members: TeamMember[] = request.memberAgents.map((m) => ({
|
||||
id: generateId(),
|
||||
agentId: m.agentId,
|
||||
name: `Agent-${m.agentId.slice(0, 4)}`,
|
||||
@@ -208,7 +205,7 @@ export const useTeamStore = create<TeamStoreState>((set, get) => ({
|
||||
},
|
||||
|
||||
setActiveTeam: (team: Team | null) => {
|
||||
set(state => ({
|
||||
set(() => ({
|
||||
activeTeam: team,
|
||||
metrics: team ? calculateMetrics(team) : null,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user