mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
790 B
790 B
Dify Builder
Shared session/stream logic for the App Builder Build, Edit, and Fix APIs. It is consumed by both the standalone debug page and the in-editor App Builder panel.
Internal Modules
state.ts: primitive session atoms. Feature consumers scope these atoms per app withScopeProvider.use-dify-builder-session.ts: the controller writes session atoms without subscribing to them.useDifyBuilderSessionis the read-and-write wrapper used by the debug page.
Keep UI-only state, such as composer drafts and expanded cards, in the owning
component. Add derived atoms for shared fields instead of passing the complete
SessionView through React Context.
External Modules
config:CSRF_COOKIE_NAME,CSRF_HEADER_NAMEfor authenticated console requests.