Commit Graph

1554 Commits

Author SHA1 Message Date
0618b2532f feat: Add Enter key handler support to assemble variables generate modal 2026-02-05 01:36:13 +08:00
15c0011897 feat: implement file structured output 2026-02-05 00:11:39 +08:00
10fb482351 perf: Remove deprecated optional props in LLM node tool config 2026-02-04 22:36:19 +08:00
9bd714623e feat: Add mutual exclusion between structured output and tools in LLM
node
2026-02-04 22:36:19 +08:00
yyh
8a9e0e3b31 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	web/eslint-suppressions.json
2026-02-04 18:15:32 +08:00
23f98652e1 perf: Add null check for onAssembleVariables callback 2026-02-04 17:52:13 +08:00
cc5705cb71 fix: auto summary env (#31930) 2026-02-04 17:47:38 +08:00
74b027c41a fix: fix mcp output schema is union type frontend crash (#31779)
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
2026-02-04 17:33:41 +08:00
yyh
2df0d540a9 fix: remove unreachable polling from artifacts-section
The Skill view is locked (ViewPicker disabled) while a workflow
is running or chatflow is responding, so ArtifactsSection is never
mounted during runs. Polling there is dead code.
2026-02-04 17:31:44 +08:00
yyh
d0200e90d2 feat: poll sandbox files every 5s during workflow/chatflow runs
Add conditional refetchInterval to Artifacts components so the file
list refreshes automatically while a workflow debug run or chatflow
preview is in progress, stopping once the run completes.
2026-02-04 16:59:09 +08:00
b96459b656 fix: Fix sub-graph variable null check logic 2026-02-04 15:22:27 +08:00
yyh
00e9dce3ad feat: add isPreviewable guard for binary file preview in artifacts
Add a unified isPreviewable flag to useFileTypeInfo that guards against
rendering binary files as text in both skill artifacts and variable
inspect artifacts preview. Upgrade extension arrays to Sets for O(1)
lookups.
2026-02-04 13:32:22 +08:00
36bfb08f34 fix: collaboration user's name display in editor line 1 2026-02-04 10:11:40 +08:00
yyh
f1d099d50d refactor: extract skill save context, stabilize mutation dependency, and deduplicate cache updates
Split SkillSaveContext and useSkillSaveManager into a separate file to
fix react-refresh/only-export-components lint error. Destructure
mutateAsync from useUpdateAppAssetFileContent for a stable callback
reference, preventing unnecessary useCallback cascade rebuilds. Extract
shared patchFileContentCache helper to unify setQueryData logic between
updateCachedContent and the collaboration event handler.
2026-02-03 21:09:35 +08:00
c9b0d90ca7 Merge branch 'feat/support-agent-sandbox' of github.com:langgenius/dify into feat/support-agent-sandbox 2026-02-03 18:00:44 +08:00
70c887ed5c fix undo/redo 2026-02-03 18:00:06 +08:00
yyh
178421a8ac fix: pass appId instead of userId to sandbox file API calls
The backend route /apps/{app_id}/sandbox/files expects the actual app ID
as the URL parameter and derives sandbox_id from the logged-in user
internally. The frontend was incorrectly passing userProfile.id (user ID)
as the appId, resulting in wrong storage paths.
2026-02-03 17:59:21 +08:00
yyh
0fcddfe9a5 feat: invalidate sandbox files cache on workflow/chatflow run completion
Add useInvalidateSandboxFiles hook and call it alongside
fetchInspectVars/invalidAllLastRun so the Artifacts tab refreshes
automatically when a chatflow preview or workflow debug run finishes.
2026-02-03 16:47:05 +08:00
yyh
19a5aee38e fix: hide divider when OnlineUsers component is not rendered
Move the Divider into the OnlineUsers component so it conditionally
renders together with the online users content, preventing an orphaned
divider from appearing next to the preview button.
2026-02-03 15:35:49 +08:00
31177462e1 fix: clean up mixed variable extractor code 2026-02-03 15:26:15 +08:00
5441b9c3ad fix: add computer_use property to mixed variable extractor 2026-02-03 10:33:47 +08:00
yyh
808a32c457 fix: add pending state to export button to prevent duplicate clicks
Use useTransition to disable the export button and show loading state
in the DSL export confirm modal during async export operations.
2026-02-02 15:52:03 +08:00
yyh
e2913d9ee1 Revert "refactor!: replace Zustand global store with TanStack Query for systemFeatures"
This reverts commit 806ece9a67.
2026-02-01 19:06:45 +08:00
yyh
806ece9a67 refactor!: replace Zustand global store with TanStack Query for systemFeatures
Follow-up to SSR prefetch migration (2833965). Eliminates the Zustand
middleman that was syncing TanStack Query data into a separate store.

- Remove useGlobalPublicStore Zustand store entirely
- Create hooks/use-global-public.ts with useSystemFeatures,
  useSystemFeaturesQuery, useIsSystemFeaturesPending, useSetupStatusQuery
- Migrate all 93 consumers to import from @/hooks/use-global-public
- Simplify global-public-context.tsx to a thin provider component
- Update 18 test files to mock the new hook interface
- Fix SetupStatusResponse.setup_at type from Date to string (JSON)
- Fix setup-status.spec.ts mock target to match consoleClient

BREAKING CHANGE: useGlobalPublicStore is removed. Use useSystemFeatures()
from @/hooks/use-global-public instead.
2026-02-01 19:06:08 +08:00
yyh
3ca767de47 refactor: migrate localStorage calls to storage utility module
Replace direct localStorage.getItem/setItem/removeItem with the
centralized storage module which provides versioned keys, automatic
JSON serialization, SSR safety, and error handling.
2026-02-01 17:34:37 +08:00
b6465327c1 fix: Fix race condition in prompt editor reference sync 2026-01-31 22:10:38 +08:00
4d82769baa fix: Fix null safety issues in workflow variable components 2026-01-31 21:26:32 +08:00
be96e6032e refactor: add json schema type guard 2026-01-31 00:57:45 +08:00
078e2d7150 refactor: streamline variable inspect editor state 2026-01-31 00:31:26 +08:00
473262d70e refactor: type event emitter payloads
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 00:04:57 +08:00
51ffab8a1a refactor: type variable inspect handlers
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-31 00:04:57 +08:00
3bdc16ac5f refactor: make validateJSONSchema type-safe
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-01-30 23:30:51 +08:00
03ec2f64cd refactor: Refactor storage keys into hierarchical structure 2026-01-30 23:23:21 +08:00
a052c414ac refactor: Replace hardcoded localStorage key with constant 2026-01-30 23:07:41 +08:00
d0d553ba38 refactor: Refactor context generate modal storage key management 2026-01-30 22:59:53 +08:00
bc1d3bdf57 refactor: Extract nested node ID parsing into shared utility 2026-01-30 22:24:30 +08:00
618dde1e3d refactor: Refactor chat view to use useMemo for version mapping 2026-01-30 22:24:30 +08:00
yyh
9d5db4993d fix: disable SSR for ImportSkillModal dynamic import 2026-01-30 22:02:45 +08:00
yyh
ea88bcfbd2 feat: add ZIP skill import with client-side extraction
Add import skill modal that accepts .zip files via drag-and-drop or
file picker, extracts them client-side using fflate, validates structure
and security constraints, then batch uploads via presigned URLs.

- Add fflate dependency for browser-side ZIP decompression
- Create zip-extract.ts with fflate filter API for validation
- Create zip-to-upload-tree.ts for BatchUploadNodeInput tree building
- Create import-skill-modal.tsx with drag-and-drop support
- Lazy-load ImportSkillModal via next/dynamic for bundle optimization
- Add en-US and zh-Hans i18n keys for import modal
2026-01-30 21:54:00 +08:00
ea91f96924 refactor: Replace hardcoded string checks with VarType enum 2026-01-30 21:51:03 +08:00
73b78c9edc refactor: Improve type safety in context generate modal hooks 2026-01-30 21:41:04 +08:00
617b64bb93 refactor: Improve type safety in context generate modal hooks 2026-01-30 21:41:04 +08:00
304d8e5fe7 feat: Add @ and keyboard navigation to tool picker in prompt editor 2026-01-30 20:49:14 +08:00
yyh
dbc32af932 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox
# Conflicts:
#	api/app.py
#	api/controllers/console/app/generator.py
#	api/core/llm_generator/llm_generator.py
#	web/eslint-suppressions.json
#	web/pnpm-lock.yaml
#	web/tailwind-common-config.ts
2026-01-30 20:08:35 +08:00
90fe9abab7 revert: revert human input relevant code (#31766)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 19:18:49 +08:00
b7e752078c fix: trigger doc link (#31754) 2026-01-30 17:30:24 +08:00
yyh
25ee3f7bc4 fix(skill): restore flex spacer to keep search input right-aligned
Add placeholder div for future CategoryTabs from marketplace API.
2026-01-30 17:18:18 +08:00
yyh
a4b0e4a2a0 fix(skill): clear file tree highlight when switching to start tab
The sync hook skipped deselectAll() when activeTabId was START_TAB_ID,
leaving stale highlights after closing the last file tab.
2026-01-30 17:12:51 +08:00
yyh
0f6f46b1f0 fix: use kebab-case in skills 2026-01-30 16:18:33 +08:00
yyh
03c8387830 fix(skill): make template header and search sticky on scroll 2026-01-30 16:12:47 +08:00