Skip to content

Dev jdb#151

Merged
Amery2010 merged 9 commits intou14app:developfrom
jamesbmour:dev-jdb
Feb 10, 2026
Merged

Dev jdb#151
Amery2010 merged 9 commits intou14app:developfrom
jamesbmour:dev-jdb

Conversation

@jamesbmour
Copy link
Contributor

No description provided.

- Introduced `promptOverrides` configuration in the `Config` interface to allow users to customize built-in prompt templates.
- Implemented parsing of prompt overrides in the SSE API routes, ensuring validation and error handling.
- Updated various components and hooks to utilize the new prompt overrides, including `KnowledgeGraph`, `FinalReport`, and `useDeepResearch`.
- Enhanced prompt generation functions to support dynamic templates based on user-defined overrides.
- Added UI elements in the settings to allow users to input JSON for prompt overrides, with appropriate validation and error messages.
- Updated localization files to include new strings related to prompt overrides.
…import functionality and shortcut management
Copilot AI review requested due to automatic review settings February 10, 2026 02:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Deep Research app’s configurability and UX by introducing prompt template overrides, new research workflow controls, domain-filtered web search, and multiple UI enhancements (workflow progress, keyboard shortcuts, session import/export, and richer task management).

Changes:

  • Add a prompt-template override system (DeepResearchPromptOverrides) and plumb it through deep-research prompts, search providers, UI, and SSE APIs.
  • Add new research controls and UX: workflow progress widget, submit shortcuts (Ctrl/Cmd+Enter), task filtering/sorting/export, and session snapshot import/export + global keyboard shortcuts.
  • Add web search domain include/exclude filters and new settings for report style/length, auto follow-up rounds, and collection topic limits.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/deep-research/search.ts Accepts prompt overrides and uses resolved templates in provider prompts (e.g., Exa rewriting).
src/utils/deep-research/prompts.ts Refactors deep-research prompt builders to accept prompt overrides and adds output-guidelines accessor.
src/utils/deep-research/index.ts Parses and persists prompt overrides at runtime; passes overrides through deep research pipeline.
src/store/setting.ts Adds new persisted settings (auto review rounds, domain filters, report style/length, prompt overrides).
src/locales/zh-CN.json Adds translations for new header/session features, workflow UI, settings, and task management strings.
src/locales/vi-VN.json Adds translations for new header/session features, workflow UI, settings, and task management strings.
src/locales/es-ES.json Adds translations for new header/session features, workflow UI, settings, and task management strings.
src/locales/en-US.json Adds translations for new header/session features, workflow UI, settings, and task management strings.
src/hooks/useWebSearch.ts Adds domain include/exclude filtering to third-party web search results.
src/hooks/useSubmitShortcut.ts Introduces reusable Ctrl/Cmd+Enter “submit” shortcut hook for inputs/textareas.
src/hooks/useKnowledge.ts Makes rewriting prompt respect deep research prompt overrides from settings.
src/hooks/useDeepResearch.ts Adds prompt overrides support; introduces auto review rounds, topic caps, and report preference requirements.
src/constants/prompts.ts Defines canonical deep-research prompt templates, override parsing, and template resolution logic.
src/components/Setting.tsx Adds UI + validation for new settings (prompt overrides JSON, domain filters, report style/length, review/topic sliders).
src/components/Research/WorkflowProgress.tsx Adds a workflow progress component showing stage completion and overall progress.
src/components/Research/Topic.tsx Adds quick-start topic presets and Ctrl/Cmd+Enter submission; improves label semantics.
src/components/Research/SearchResult.tsx Adds task search/filter/sort, expand/collapse all, retry/remove failed tasks, and filtered export (MD/JSON).
src/components/Research/FinalReport/index.tsx Adds Ctrl/Cmd+Enter submission and applies prompt overrides to Artifact system instruction.
src/components/Research/FinalReport/KnowledgeGraph.tsx Makes knowledge graph prompt respect prompt overrides.
src/components/Research/Feedback.tsx Adds Ctrl/Cmd+Enter submission shortcut hint/behavior.
src/components/Internal/Header.tsx Adds session snapshot export/import, shortcuts dialog, and global keyboard shortcuts.
src/app/page.tsx Inserts workflow progress component into the main page flow.
src/app/layout.tsx Adds suppressHydrationWarning to body to reduce hydration warnings.
src/app/api/sse/route.ts Adds prompt override parsing/validation for POST SSE endpoint and passes into DeepResearch.
src/app/api/sse/live/route.ts Adds prompt override parsing/validation for GET SSE endpoint and passes into DeepResearch.
docs/deep-research-api-doc.md Documents promptOverrides support in the public SSE API config.
AGENTS.md Adds contributor/agent guidance (commands, conventions, project structure, testing note).
.vscode/settings.json Updates editor settings (files.exclude additions and related workspace config).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 36 to 40
const enableCitationImage =
getValueFromSearchParams("enableCitationImage") === "false";
const enableReferences =
getValueFromSearchParams("enableReferences") === "false";
const enableFileFormatResource =
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the live SSE route, enableCitationImage/enableReferences are derived with === "false", which inverts the meaning ("false" becomes true) and also makes the default false when the query param is omitted. These flags should default to true and only be false when the param explicitly indicates false (e.g., parse boolean or use !== "false").

Copilot uses AI. Check for mistakes.
Comment on lines 79 to 83
const options: SearchProviderOptions = {
provider: searchProvider,
maxResult: searchMaxResult,
query,
};
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SearchProviderOptions now supports promptOverrides, but useWebSearch never passes prompt overrides from settings into createSearchProvider. As a result, overrides like rewritingPrompt won't affect providers (e.g., Exa summary rewriting) when web search runs from the UI. Consider parsing deepResearchPromptOverrides from useSettingStore and setting options.promptOverrides before calling createSearchProvider.

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +59
// Override built-in prompt templates. You can provide one or more prompt keys as needed. (optional)
promptOverrides?: Partial<{
systemInstruction: string;
outputGuidelinesPrompt: string;
systemQuestionPrompt: string;
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation lists a fixed set of promptOverrides keys, but the implementation supports additional keys (e.g., guidelinesPrompt, serpQuerySchemaPrompt, rewritingPrompt, knowledgeGraphPrompt, etc.). To avoid drifting docs, consider referencing the canonical key list (or listing all supported keys) so API consumers know what can be overridden.

Copilot uses AI. Check for mistakes.
@Amery2010 Amery2010 changed the base branch from main to develop February 10, 2026 08:07
@Amery2010 Amery2010 merged commit ff91edc into u14app:develop Feb 10, 2026
5 of 6 checks passed
@Amery2010
Copy link
Contributor

Thank you for your contribution to this project. The feature you submitted is very useful and fills a gap in our functionality in this area.

I have merged your code into the main branch and upgraded the project version to v0.11.0.
However, I have made the following two minor changes to your submitted code:

  • Removed the session import and export buttons from the top toolbar. This functionality is already implemented in the history feature, which you can access in the history.
  • On mobile devices, I have hidden the specific workflow details, leaving only the progress bar.

These two changes are primarily due to the limited screen space on mobile devices; I believe it's important to allow users to focus their attention on the core functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments