MCPcopy Create free account
hub / github.com/InternScience/InternAgent / add_feedback

Method add_feedback

internagent/mas/interface.py:202–238  ·  view source on GitHub ↗

Add feedback to a session and optionally resume execution. Args: session_id: Session ID feedback: Feedback content target_idea_ids: Specific ideas the feedback applies to auto_resume: Whether to automatically resume session after feed

(self,
                         session_id: str,
                         feedback: dict,
                         target_idea_ids: List[str] = None,
                         auto_resume: bool = True)

Source from the content-addressed store, hash-verified

200 return await self.get_session_status(session_id)
201
202 async def add_feedback(self,
203 session_id: str,
204 feedback: dict,
205 target_idea_ids: List[str] = None,
206 auto_resume: bool = True) -> Dict[str, Any]:
207 """
208 Add feedback to a session and optionally resume execution.
209
210 Args:
211 session_id: Session ID
212 feedback: Feedback content
213 target_idea_ids: Specific ideas the feedback applies to
214 auto_resume: Whether to automatically resume session after feedback
215
216 Returns:
217 Updated session status
218
219 Raises:
220 RuntimeError: If system is not ready
221 """
222 self._ensure_system_ready()
223
224 await self.orchestration_agent.add_feedback(
225 session_id=session_id,
226 feedback=feedback,
227 target_idea_ids=target_idea_ids
228 )
229
230 self._update_session_tracking(session_id)
231
232 # Auto-resume if requested and session is waiting for feedback
233 if auto_resume:
234 status = await self.get_session_status(session_id)
235 if status.get("state") == WorkflowState.REFLECTING.value:
236 await self.resume_session(session_id)
237
238 return await self.get_session_status(session_id)
239
240 async def resume_session(self, session_id: str) -> Dict[str, Any]:
241 """

Callers 1

generate_ideasMethod · 0.45

Calls 5

_ensure_system_readyMethod · 0.95
get_session_statusMethod · 0.95
resume_sessionMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected