Skip to content

Opens summary before AI result #4489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 31, 2025
Merged

Conversation

sergeibbb
Copy link
Member

@sergeibbb sergeibbb commented Jul 14, 2025

Description

Solves #4328

  • Updates AI provider methods to return the used model before the request is finished. The model is used to form partial document context.
  • Stores partial context in URI that is enough to identify the document and to re-generate the content if it's needed.
  • Stores the usage part of the context in memory that is used for sending feedback.
  • Introduces a blinking hack to the markdown.ts in order to fight VSCode's caching of views (rewriting using the FileSystemProvider didn't help, but it can be reviewed here: 8c365a8

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

sergeibbb added a commit that referenced this pull request Jul 14, 2025
sergeibbb added a commit that referenced this pull request Jul 14, 2025
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 14, 2025
sergeibbb added a commit that referenced this pull request Jul 14, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from c1137a2 to 20ca261 Compare July 14, 2025 10:58
sergeibbb added a commit that referenced this pull request Jul 14, 2025
@sergeibbb sergeibbb force-pushed the 4449-feedback-provider branch from 1f08c2d to f851fe3 Compare July 14, 2025 14:07
sergeibbb added a commit that referenced this pull request Jul 14, 2025
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 14, 2025
@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from 20ca261 to 04d5300 Compare July 14, 2025 14:08
sergeibbb added a commit that referenced this pull request Jul 14, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 14, 2025
@d13 d13 linked an issue Jul 22, 2025 that may be closed by this pull request
9 tasks
Copy link
Member

@d13 d13 left a comment

Choose a reason for hiding this comment

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

This looks good!

I have one question/consideration on the content design before approving.

@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from 04d5300 to ffef047 Compare July 28, 2025 14:28
sergeibbb added a commit that referenced this pull request Jul 28, 2025
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 28, 2025
sergeibbb added a commit that referenced this pull request Jul 28, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 28, 2025
@sergeibbb sergeibbb requested a review from d13 July 28, 2025 14:35
Copy link
Member

@d13 d13 left a comment

Choose a reason for hiding this comment

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

Looks like you still need to rebase, otherwise looks good.

@gitkraken gitkraken deleted a comment from Wbaker7702 Jul 28, 2025
@sergeibbb sergeibbb force-pushed the 4449-feedback-provider branch from f851fe3 to b98dc49 Compare July 28, 2025 16:41
sergeibbb added a commit that referenced this pull request Jul 28, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from ffef047 to 5aaeed8 Compare July 28, 2025 17:17
sergeibbb added a commit that referenced this pull request Jul 28, 2025
sergeibbb added a commit that referenced this pull request Jul 28, 2025
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 28, 2025
sergeibbb added a commit that referenced this pull request Jul 28, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from 5aaeed8 to cdf7dfd Compare July 28, 2025 18:08
sergeibbb added a commit that referenced this pull request Jul 28, 2025
@sergeibbb sergeibbb changed the base branch from 4449-feedback-provider to main July 28, 2025 18:09
@sergeibbb
Copy link
Member Author

sergeibbb commented Jul 28, 2025

@d13

I've changed the base to main branch.

The main difference of what is affected can be seen here:

image

The red areas were implemented differently using a class that was added in another branch.

(the original version was based on #4518, code)

@sergeibbb sergeibbb requested a review from d13 July 28, 2025 18:24
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
@sergeibbb sergeibbb force-pushed the feature/4328-open-summary-before-result branch from cdf7dfd to 888f521 Compare July 31, 2025 11:41
@sergeibbb sergeibbb merged commit 14aaccc into main Jul 31, 2025
3 checks passed
sergeibbb added a commit that referenced this pull request Jul 31, 2025
Addresses issues where markdown previews may display corrupted or
outdated content
by detecting tab visibility changes and forcing content recovery for
affected documents.
Improves reliability of previews when switching tabs or reopening custom
editors.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 31, 2025
sergeibbb added a commit that referenced this pull request Jul 31, 2025
Thats because we cannot modify URI of document to review context after
the result is rendered.
(#4328, #4489)
sergeibbb added a commit that referenced this pull request Jul 31, 2025
@sergeibbb sergeibbb deleted the feature/4328-open-summary-before-result branch July 31, 2025 11:51
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.

Support opening an explain summary document before summary content is generated
2 participants