Files
ragflow/web
Hz_ 863b35db7f fix(go-agent-web): correct BGPT canvas form watcher usage (#16682)
## Summary

Fixes a page crash when opening the BGPT node configuration in the
canvas.

## Root Cause

BGPT was using the tool-form watcher call pattern in a normal canvas
component form.

Tool forms use:

useWatchFormChange(form)

Canvas component forms use:

useWatchFormChange(node?.id, form)

Tool is not equal to component. The BGPT canvas component imported the
component-level hook but called it like a tool-form hook, so the form
argument became undefined and React Hook Form tried to read control from
a null context.

## Change

Updated the BGPT canvas form to pass the node id and form instance
correctly.

## Validation

Ran ESLint for the changed file:
npx eslint src/pages/agent/form/bgpt-form/index.tsx

<img width="1369" height="1184" alt="image"
src="https://github.com/user-attachments/assets/a40c5202-7394-4f26-9da2-08329dcc7fbf"
/>
2026-07-07 11:08:50 +08:00
..
2026-06-18 13:14:18 +08:00
2024-11-21 18:14:22 +08:00
2026-01-04 19:14:20 +08:00
2026-07-03 17:00:43 +08:00

Install front-end dependencies

npm install

Launch front-end

npm run dev

The following output confirms a successful launch of the system:

Login to RAGFlow web UI

Open your browser and navigate to:

http://localhost:9222 or http://[YOUR_MACHINE_IP]:9222

Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222).

Login to RAGFlow web admin UI

Open your browser and navigate to:

http://localhost:9222/admin or http://[YOUR_MACHINE_IP]:9222/admin

Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222/admin).

Shutdown front-end

Ctrl + C or

kill -f "umi dev"