|
310 | 310 | DOCUMENT_ACTION_WORKFLOW_MIN_LIMIT = 2 |
311 | 311 | DOCUMENT_ACTION_WORKFLOW_MAX_LIMIT = 1000 |
312 | 312 | DOCUMENT_ACTION_WORKFLOW_DEFAULT_LIMIT = 10 |
| 313 | +# Merge, mirrored from MERGE_* in functions_document_actions.py. |
| 314 | +DOCUMENT_ACTION_MERGE_CHAT_DEFAULT_LIMIT = 10 |
| 315 | +DOCUMENT_ACTION_MERGE_WORKFLOW_DEFAULT_LIMIT = 100 |
| 316 | +DOCUMENT_ACTION_MERGE_ROW_MIN_LIMIT = 1000 |
| 317 | +DOCUMENT_ACTION_MERGE_ROW_MAX_LIMIT = 1_000_000 |
| 318 | +DOCUMENT_ACTION_MERGE_CHAT_DEFAULT_ROWS = 250_000 |
| 319 | +DOCUMENT_ACTION_MERGE_WORKFLOW_DEFAULT_ROWS = 1_000_000 |
313 | 320 |
|
314 | 321 | # Schemes permitted for administrator-configured navigation links. These render |
315 | 322 | # into an anchor href, so allowing arbitrary schemes would let a saved link |
|
3820 | 3827 | {"value": "document_analyze", "label": "Analyse documents"}, |
3821 | 3828 | {"value": "document_compare", "label": "Compare documents"}, |
3822 | 3829 | {"value": "tabular_analyze", "label": "Analyse spreadsheets"}, |
| 3830 | + {"value": "tabular_inspect", "label": "Inspect spreadsheets"}, |
| 3831 | + {"value": "tabular_merge", "label": "Merge spreadsheets"}, |
| 3832 | + {"value": "document_merge", "label": "Merge documents"}, |
3823 | 3833 | {"value": "web_search", "label": "Search the web"}, |
3824 | 3834 | {"value": "url_fetch", "label": "Read linked pages"}, |
3825 | 3835 | {"value": "deep_research", "label": "Research in depth"}, |
|
4619 | 4629 | "group": "Comparison", |
4620 | 4630 | "depends_on": {"key": "document_action_comparison_enabled", "equals": True}, |
4621 | 4631 | }, |
| 4632 | + { |
| 4633 | + "key": "document_action_merge_enabled", |
| 4634 | + "settings_path": ["document_action_capabilities", "merge", "enabled"], |
| 4635 | + "type": "switch", |
| 4636 | + "label": "Enable Merge", |
| 4637 | + "help": ( |
| 4638 | + "Lets chat orchestration combine the rows of several CSV or Excel files " |
| 4639 | + "into one table, lining up columns that differ when asked, then deliver it " |
| 4640 | + "as a CSV or Excel file. Rows are appended exactly by code, not rewritten by " |
| 4641 | + "a model. Also allows inspecting the files' columns first." |
| 4642 | + ), |
| 4643 | + "default": True, |
| 4644 | + "group": "Merge", |
| 4645 | + }, |
| 4646 | + { |
| 4647 | + "key": "document_action_merge_chat_max_documents", |
| 4648 | + "settings_path": ["document_action_capabilities", "merge", "chat_max_documents"], |
| 4649 | + "type": "number", |
| 4650 | + "label": "Merge: Chat Document Limit", |
| 4651 | + "help": ( |
| 4652 | + "Most files one chat request may merge or inspect. Merging is cheaper than " |
| 4653 | + "Analyze because no model reads the files, so this can be higher." |
| 4654 | + ), |
| 4655 | + "default": DOCUMENT_ACTION_MERGE_CHAT_DEFAULT_LIMIT, |
| 4656 | + "min": DOCUMENT_ACTION_CHAT_MIN_LIMIT, |
| 4657 | + "max": DOCUMENT_ACTION_CHAT_MAX_LIMIT, |
| 4658 | + "group": "Merge", |
| 4659 | + "depends_on": {"key": "document_action_merge_enabled", "equals": True}, |
| 4660 | + }, |
| 4661 | + { |
| 4662 | + "key": "document_action_merge_workflow_max_documents", |
| 4663 | + "settings_path": ["document_action_capabilities", "merge", "workflow_max_documents"], |
| 4664 | + "type": "number", |
| 4665 | + "label": "Merge: Workflow Document Limit", |
| 4666 | + "help": "The same limit for a workflow run, where large batches belong.", |
| 4667 | + "default": DOCUMENT_ACTION_MERGE_WORKFLOW_DEFAULT_LIMIT, |
| 4668 | + "min": DOCUMENT_ACTION_WORKFLOW_MIN_LIMIT, |
| 4669 | + "max": DOCUMENT_ACTION_WORKFLOW_MAX_LIMIT, |
| 4670 | + "group": "Merge", |
| 4671 | + "depends_on": {"key": "document_action_merge_enabled", "equals": True}, |
| 4672 | + }, |
| 4673 | + { |
| 4674 | + "key": "document_action_merge_chat_max_rows", |
| 4675 | + "settings_path": ["document_action_capabilities", "merge", "chat_max_rows"], |
| 4676 | + "type": "number", |
| 4677 | + "label": "Merge: Chat Row Limit", |
| 4678 | + "help": ( |
| 4679 | + "Most rows one chat merge may produce. A few very large files can cost more " |
| 4680 | + "than many small ones, so rows are limited as well as files." |
| 4681 | + ), |
| 4682 | + "default": DOCUMENT_ACTION_MERGE_CHAT_DEFAULT_ROWS, |
| 4683 | + "min": DOCUMENT_ACTION_MERGE_ROW_MIN_LIMIT, |
| 4684 | + "max": DOCUMENT_ACTION_MERGE_ROW_MAX_LIMIT, |
| 4685 | + "group": "Merge", |
| 4686 | + "depends_on": {"key": "document_action_merge_enabled", "equals": True}, |
| 4687 | + }, |
| 4688 | + { |
| 4689 | + "key": "document_action_merge_workflow_max_rows", |
| 4690 | + "settings_path": ["document_action_capabilities", "merge", "workflow_max_rows"], |
| 4691 | + "type": "number", |
| 4692 | + "label": "Merge: Workflow Row Limit", |
| 4693 | + "help": "The same row limit for a workflow run.", |
| 4694 | + "default": DOCUMENT_ACTION_MERGE_WORKFLOW_DEFAULT_ROWS, |
| 4695 | + "min": DOCUMENT_ACTION_MERGE_ROW_MIN_LIMIT, |
| 4696 | + "max": DOCUMENT_ACTION_MERGE_ROW_MAX_LIMIT, |
| 4697 | + "group": "Merge", |
| 4698 | + "depends_on": {"key": "document_action_merge_enabled", "equals": True}, |
| 4699 | + }, |
4622 | 4700 | ], |
4623 | 4701 | # Rendered by V1 only while Workspace Mode is on, matching agent-toggles-card. |
4624 | 4702 | "plugin-feature-toggles": [ |
@@ -7123,7 +7201,7 @@ def _apply_nested_paths(normalized, current_settings, warnings=None): |
7123 | 7201 | Deep Research reading the stale copy. |
7124 | 7202 |
|
7125 | 7203 | ``settings_path`` names a single destination as a list of segments. |
7126 | | - ``document_action_capabilities`` holds six values across two action types, |
| 7204 | + ``document_action_capabilities`` holds the Analyze, Comparison and Merge values, |
7127 | 7205 | and nothing reads a flattened form of them, so writing the flat keys through |
7128 | 7206 | would save a setting the application never looks at. |
7129 | 7207 |
|
|
0 commit comments