* Remove extra not null assertions
With https://github.com/microsoft/TypeScript/pull/56908, TS should better preserve type refinements. To help test this out, I made a quick pass through our code to remove type assertions that are no longer needed
Most of these are not impacted by https://github.com/microsoft/TypeScript/pull/56908 but removing them helps TS test changes like this
Not adding an eslint rule for now as it requires whole program intellisense, which is too slow for commit hooks
* Fix merge
* debt - use hunks to render preview diff
* add `InteractiveEditorRequest#previewDocument` to indicate for which document edits are previewed before being applied
* more test coverage
* - Session has textModelN and targetUri where they must not always be equal
- for preview mode create textModelN copy so that AI edits can always be applied
- let preview mode work with hunk information
* - live preview uses hunk information
- tweak utils
* fix live-mode toggle diff
* Change ChatAgent history to include real requests, response data, variables, etc.
For #199908
* Tweak
* Update snapshots
* Clean up
* Update addCompleteRequest
* Filter out other progress types
* Fix chat slash command data in history
* Don't include slashCommand in history request at all, since it's deprecated anyway
* undefined
* chore - move chat session service implementation and interface into their own files
* chore - move chat saving service implementation and interface into their own files
* - move hunks into session (instead of strategy)
- recompute them after receiving AI changes
- accept& discard moves hunks from textModelN to textModel0 and vice versa
- service renames
- tests
* - session doesn't know about an editor, only service does
- allow to "move" session to a different editor
- let controller pickup session after move to its editor
- session saving picks up orphand sessions
* try to restore editors when group is still valid
* ctrl - don't pause when cancellation happens during session create
* fix tests
* add inline chat save logic that ensures AI generated changes are only saved after consent
* live - when cancelling don't undo until start version but revert changes
* add setting to control save participation
* fix typo
* stub new services, fixes tests
* remove start-method from strategies
* rename - activeSession to session
* keep strategy alive when pausing session, let strategy participate in pause, allow to call LiveStrategy#renderChanges repeatedly without recomputing hunks
* reset diff toggled state
* make sure to reset hunk display on done (dipose, accept, discard)
* reset diff state in pause, not hide function
* don't drag targetWindow all the way across all the layers
* add `ILimiter#clear`, add tests and define onDrain and clear behaviour
* fix compilo
* Queue/Limit - clarify onDrain timing, make sure it fires only once, add whenIdle
* chat - clear edit queue on error, adopt whenIdle
* add test to ensure progress edit stream stop on being cancelled
* add input widget toolbar, add close action
* * make "finish on typing" configurable and turn it off by default
* add configure action to widget toolbar
* fix tests
* wip
* add yet another live mode which is live and live preview...
* use `renderLines` and view zones for orginal contents, render accept, discard, and compare in line
* remove LiveStrategy2 again
* render insertion diff as progressive changes happen
* implement discard
* implement explicit accept via button and implict accept via typing inside changes
* merge diff changes that are somewhat near
* pass zone, not just widget to strategies
* add `IEditorDecorationsCollection#append`
* move live3 actions into widget, don't render normal accept, discard, allow strategry to trigger accept, discard flows
* cleanup
* make sure re-run works