MCPcopy Index your code
hub / github.com/codeaashu/claude-code / ResumeConversation

Function ResumeConversation

src/screens/ResumeConversation.tsx:67–315  ·  view source on GitHub ↗
({
  commands,
  worktreePaths,
  initialTools,
  mcpClients,
  dynamicMcpConfig,
  debug,
  mainThreadAgentDefinition,
  autoConnectIdeFlag,
  strictMcpConfig = false,
  systemPrompt,
  appendSystemPrompt,
  initialSearchQuery,
  disableSlashCommands = false,
  forkSession,
  taskListId,
  filterByPr,
  thinkingConfig,
  onTurnComplete
}: Props)

Source from the content-addressed store, hash-verified

65 onTurnComplete?: (messages: Message[]) => void | Promise<void>;
66};
67export function ResumeConversation({
68 commands,
69 worktreePaths,
70 initialTools,
71 mcpClients,
72 dynamicMcpConfig,
73 debug,
74 mainThreadAgentDefinition,
75 autoConnectIdeFlag,
76 strictMcpConfig = false,
77 systemPrompt,
78 appendSystemPrompt,
79 initialSearchQuery,
80 disableSlashCommands = false,
81 forkSession,
82 taskListId,
83 filterByPr,
84 thinkingConfig,
85 onTurnComplete
86}: Props): React.ReactNode {
87 const {
88 rows
89 } = useTerminalSize();
90 const agentDefinitions = useAppState(s => s.agentDefinitions);
91 const setAppState = useSetAppState();
92 const [logs, setLogs] = React.useState<LogOption[]>([]);
93 const [loading, setLoading] = React.useState(true);
94 const [resuming, setResuming] = React.useState(false);
95 const [showAllProjects, setShowAllProjects] = React.useState(false);
96 const [resumeData, setResumeData] = React.useState<{
97 messages: Message[];
98 fileHistorySnapshots?: FileHistorySnapshot[];
99 contentReplacements?: ContentReplacementRecord[];
100 agentName?: string;
101 agentColor?: AgentColorName;
102 mainThreadAgentDefinition?: AgentDefinition;
103 } | null>(null);
104 const [crossProjectCommand, setCrossProjectCommand] = React.useState<string | null>(null);
105 const sessionLogResultRef = React.useRef<SessionLogResult | null>(null);
106 // Mirror of logs.length so loadMoreLogs can compute value indices outside
107 // the setLogs updater (keeping it pure per React's contract).
108 const logCountRef = React.useRef(0);
109 const filteredLogs = React.useMemo(() => {
110 let result = logs.filter(l => !l.isSidechain);
111 if (filterByPr !== undefined) {
112 if (filterByPr === true) {
113 result = result.filter(l_0 => l_0.prNumber !== undefined);
114 } else if (typeof filterByPr === 'number') {
115 result = result.filter(l_1 => l_1.prNumber === filterByPr);
116 } else if (typeof filterByPr === 'string') {
117 const prNumber = parsePrIdentifier(filterByPr);
118 if (prNumber !== null) {
119 result = result.filter(l_2 => l_2.prNumber === prNumber);
120 }
121 }
122 }
123 return result;
124 }, [logs, filterByPr]);

Callers

nothing calls this directly

Calls 10

useTerminalSizeFunction · 0.85
useAppStateFunction · 0.85
useSetAppStateFunction · 0.85
parsePrIdentifierFunction · 0.85
isCustomTitleEnabledFunction · 0.85
enrichLogsFunction · 0.85
forEachMethod · 0.80
logErrorFunction · 0.50

Tested by

no test coverage detected