Fixes#236122
For css `\0000xx` escaping, if I'm understanding the spec correctly it turns out they eat the space character following them: https://www.w3.org/TR/CSS2/syndata.html#characters
My previous fix didn't account for this. Instead I think a safer fix is to switch to use `Css.escape`. This often over-escapes the string by converting characters that don't need it but should be safe and it fixes the original issue
* [prompt snippets]: working on recursive file references
* [prompt snippets]: working on file contents codec
* [prompt snippets]: implement the `LinesCodecDecoder`
* [prompt snippets]: working on the `SimpleTokensCodecDecoder`
* [prompt snippets]: implement first version of `PromptSyntaxCodec`
* [prompt snippets]: add `Range` attributes to all the tokens
* [prompt snippets]: refactoring components to standalone files
* [prompt snippets]: move out components to separate files, working on the first unit test
* [prompt snippets]: add the first unit test for `LinesDecoder`
* [prompt snippets]: add first unit test for the `SimpleDecoder`
* [prompt snippets]: refactor `SimpleDecoder` logic
* [prompt snippets]: make `SimpleDecoder` handle `\t` characters and improve unit tests
* [prompt snippets]: add unit tests for the `ChatbotPromptCodec` codec
* [prompt snippets]: add unit test for the `ChatbotPromptReference`
* [prompt snippets]: working on enhancing prompt context
* [prompt snippets]: enahnce working set file references on submit
* [prompt snippets]: cleanup
* [prompt snippets]: implement automatic references resolution on file variable addition
* [prompt snippets]: implement prompt snippets for implicit context files
* [prompt snippets]: improve implicit context file rendering
* [prompt snippets]: remove redundant `ChatReference` class
* [prompt snippets]: `PromptReference` can now subscribe to filesystem changes, added unit test for the `assertDefined` util
* [prompt snippets]: make `LinesDecoder` to also emit `NewLine` tokens, add more unit tests for it
* [prompt snippets]: resolve nested references for dynamic variables and update variable label
* [prompt snippets]: add nested file references to implicit context of prompt request
* [prompt snippets]: variable hover label now includes nested file references
* [prompt snippets]: add the `TestDecoder` and `TestLinesDecoder` reusable test utilities
* [prompt snippets]: add unit tests for `ChatbotPromptDecoder` decoder
* [prompt snippets]: refactor decoders to eliminate static type hacks
* [prompt snippets]: improve `BaseDecoder` logic and docs
* [prompt snippets]: add unit tests for the new reduce-less logic of the stream
* [prompt snippets]: improve doc comments, finish the basic unit test for the `PromptFileReference` class
* [prompt snippets]: finish the main unit test for the `PromptFileReference` class
* [prompt snippets]: make the `PromptFileReference` class ininite-reference-recursion-proof and add approptiate tests
* [prompt snippets]: cleanup
* [prompt snippets]: ensure codecs work well with UTF16 codepoints
* [prompt snippets]: add `randomInt()` utility and related tests
* [prompt snippets]: refactor and add more unit tests
* [prompt snippets]: fix unresolved `Buffer` import reference
* [prompt snippets]: refactor `LinesDecoder` to use `VSBuffer` as underlying data source
* [prompt snippets]: make the `ImplicitContext` to create prompt file reference object only if `prompt-snippets` config value is set
* [prompt snippets]: make the `ChatDynamicVariable` to resolve prompt file reference object only if `prompt-snippets` config value is set
* [prompt snippets]: localize (+N more) labels
* [prompt snippets]: pre PR cleanups
* [prompt snippets]: minor cleanups
* [prompt snippets]: address some PR feedback, fix an unit test issue
* [prompt snippets]: move file to common layers
* [prompt snippets]: move base codec types to base/common
* [prompt snippets]: move more codec files around
* [prompt snippets]: update a code comment
* [prompt snippets]: fix `assert.throws()` API incompatibility issue
* [prompt snippets]: minor cleanup
* [prompt snippets]: improve unit tests for the `PromptFileReference`
* [prompt snippets]: skip unit tests of `PromptFileReference` on Windows for now
* [prompt snippets]: address PR feedback
* [prompt snippets]: add `PromptFileReference.isPromptSnippetFile` getter
* [prompt snippets]: move the `assertDefined` utility to `types.ts`
* use service injection in `PromptFileReference` class
* [prompt snippets]: remove formatting changes
* [prompt snippets]: remove more formatting changes
* [prompt snippets]: revert more formatting changes
* [prompt snippets]: add logic to dispose existing variables in `ChatDynamicVariableModel`
* [prompt snippets]: cleanup
* [prompt snippets]: minor cleanup
* [prompt snippets]: remove redundant disposable registrations, cleanup more formatting changes
* [prompt snippets]: improve cross-platform newline handling, add `vertical tab` and `form feed` tokens
* [prompt snippets]: minor types naming cleanup
* [prompt snippets]: make `ChatPromptCodec` to be a global singleton object and improve doc comments
* [prompt snippets]: address PR feedback
* [prompt snippets]: remove (+N more) label, ensure that `ChatFileReferences` are scoped to files only
* [prompt snippets]: revert changes for the `ImplicitContext`
* [prompt snippets]: cleanup changes in `ChatDynamicVariableModel`
* [prompt snippets]: revert changes in the `ChatRequestParser`
* [prompt snippets]: improve history navigation
* [prompt snippets]: address PR feedback
* [prompt snippets]: allow non-prompt-snippet files to be referenced, but don't parse their contents