@blocksdiy/react-common 1.26.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,10 +30,10 @@ const generateId = (length = 10) => {
30
30
  * Walk the conversation and return every assistant-emitted tool call
31
31
  * that has no matching ToolMessage (i.e. is awaiting a result). With
32
32
  * our current setup, the only tool that ends up in this state is the
33
- * frontend HITL `ask_user`; backend tools resolve in the same agent
34
- * run and never appear pending in the UI. Used by `sendFromInputs`
35
- * to auto-skip dangling questions when the user types a new message
36
- * instead of clicking an answer.
33
+ * frontend user-choice tool; backend tools resolve in the same agent
34
+ * run and never appear pending in the UI. Used by `sendFromInputs` to
35
+ * auto-skip dangling answer UIs when the user types a new message
36
+ * instead of choosing an answer.
37
37
  */
38
38
  const _collectPendingToolCalls = (messages) => {
39
39
  const toolMessageIds = new Set();
@@ -307,14 +307,14 @@ const ChatInitializer = ({ agentId, agentChatId, chatId, token, appId, component
307
307
  // const currentAttachments = attachments;
308
308
  setPrompt("");
309
309
  setAttachments([]);
310
- // Auto-skip any HITL tool call that's still waiting for an answer.
310
+ // Auto-skip any frontend user-choice tool call that's still waiting.
311
311
  //
312
312
  // If the user types a new message instead of clicking an answer on
313
- // an `ask_user` form, the agent had returned an assistant message
314
- // with a tool call and is parked awaiting a ToolMessage that never
315
- // arrives. Without intervention here:
316
- // * `executingToolCallIds` keeps the toolCallId (the parked HITL
317
- // Promise from useHumanInTheLoop never resolves, so
313
+ // the inline form, the agent had returned an assistant message with
314
+ // a tool call and is parked awaiting a ToolMessage that never arrives.
315
+ // Without intervention here:
316
+ // * `executingToolCallIds` keeps the toolCallId (the parked Promise
317
+ // from useHumanInTheLoop never resolves, so
318
318
  // onToolExecutionEnd never fires).
319
319
  // * No ToolMessage is ever added, so the render code stays on
320
320
  // "executing" → the form looks live forever, the next refresh
@@ -330,10 +330,10 @@ const ChatInitializer = ({ agentId, agentChatId, chatId, token, appId, component
330
330
  // (assistant_tool_call → skip_result → new user turn) so the
331
331
  // agent can respond coherently.
332
332
  //
333
- // Caveat: we don't (and can't, with the current useHumanInTheLoop
334
- // API) resolve the parked HITL Promise itself — it lingers in
335
- // memory until page reload. Acceptable: one closure per skip,
336
- // cleared on refresh, no functional impact.
333
+ // Caveat: we don't (and can't, with the current useHumanInTheLoop API)
334
+ // resolve the parked Promise itself — it lingers in memory until page
335
+ // reload. Acceptable: one closure per skip, cleared on refresh, no
336
+ // functional impact.
337
337
  if (copilotAgent) {
338
338
  const pending = _collectPendingToolCalls(copilotAgent.messages);
339
339
  for (const toolCall of pending) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocksdiy/react-common",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "type": "module",
5
5
  "description": "React common",
6
6
  "keywords": [],