continue-custom/core
Zhuyi Xue 5db24e4bbc
handle data:[DONE] more robustly
although https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#request-body says

>stream    boolean    Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message

but what I see is `data:[DONE]` (without space), e.g.

```
curl -q --location 'http://localhost:8080/openai/deployments/gpt-4o/chat/completions?api-version=2023-07-01-preview' \
--header 'Authorization: Bearer <token>' \
--header 'X-Forwarded-Client-Cert: secret' \
--header 'Content-Type: application/json' \
--data '{
    "stream": true,
    "messages": [
        {
            "role": "user",
            "content": "hello."
        }
    ]
}'
data:{"choices":[],"created":0,"id":"","model":"","object":"","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}]}

data:{"choices":[{"content_filter_results":{},"delta":{"refusal":null,"role":"assistant"},"finish_reason":null,"index":0}],"created":1746741184,"id":"chatcmpl-BV3SqfEtCuk3f8fW5x7azEkELkJZ0","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_ee1d74bde0"}
...
data:{"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"delta":{"content":"?"},"finish_reason":null,"index":0}],"created":1746741184,"id":"chatcmpl-BV3SqfEtCuk3f8fW5x7azEkELkJZ0","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_ee1d74bde0"}

data:{"choices":[{"content_filter_results":{},"delta":{},"finish_reason":"stop","index":0}],"created":1746741184,"id":"chatcmpl-BV3SqfEtCuk3f8fW5x7azEkELkJZ0","model":"gpt-4o-2024-05-13","object":"chat.completion.chunk","system_fingerprint":"fp_ee1d74bde0"}

data:[DONE]
```
2025-05-08 15:09:39 -07:00
..
.vscode 🚧 basic chat working with free trial 2023-12-07 00:06:19 -08:00
autocomplete Merge pull request #5430 from continuedev/nate/no-floating-promises-core 2025-04-29 21:24:54 -07:00
commands edit prompts 2025-04-10 21:56:04 -07:00
config Merge pull request #5525 from continuedev/nate/hotfix-global-assistants 2025-05-06 13:55:21 -07:00
context refactor: replace transport headers with requestOptions 2025-05-05 19:04:39 -05:00
continueServer remove legacy config.js 2025-01-24 20:45:07 -08:00
control-plane add codestral in template enum 2025-05-05 16:52:31 -07:00
data Fixed an issue where the Log data collection feature in IntelliJ would fail. 2025-03-13 16:06:17 +09:00
deploy clean up URLs 2024-10-15 12:00:05 -07:00
diff diff cleaning logic 2025-04-21 12:09:14 -07:00
edit Merge pull request #5465 from continuedev/dallin/edit-rules 2025-05-02 17:05:34 -07:00
indexing error on no-floating-promises in core 2025-04-29 15:11:35 -07:00
llm handle data:[DONE] more robustly 2025-05-08 15:09:39 -07:00
promptFiles move to a more sensical folder location 2025-04-15 17:08:46 -07:00
protocol include rules in edit 2025-05-01 12:33:37 -07:00
tag-qry 🚧 WIP on indexing for code context provider 2024-03-03 20:22:08 -05:00
test Add rich logging of LLM interactions 2025-04-07 14:11:38 -04:00
tools suggested changes 2025-05-06 22:21:42 -07:00
util fix(reg): 🚑 remove log except when in NODE_ENV === "test" 2025-05-06 16:59:24 -07:00
vendor Update Node.js LTS to v20.19.0 2025-04-22 02:01:03 +08:00
.eslintrc.json comment 2025-04-29 15:21:27 -07:00
.gitignore gitignore updates 2024-12-05 16:14:11 -08:00
.npmignore 🔥 add tests to .npmignore 2024-03-19 12:54:17 -07:00
core.ts let -> const 2025-05-02 16:20:26 -07:00
index.d.ts Merge pull request #5528 from chezsmithy/fix-mode-switch-broken-tools 2025-05-07 15:10:57 -07:00
jest.config.js fix tests 2024-12-11 08:41:58 -08:00
package-lock.json Merge branch 'main' into nate/fixes-145 2025-04-29 13:22:45 -07:00
package.json Merge branch 'main' into nate/fixes-145 2025-04-29 13:22:45 -07:00
tsconfig.json Pre-release changes [skip ci] (#1931) 2024-08-05 15:39:31 -07:00
tsconfig.npm.json ⏩ Preview to main (#1299) 2024-05-16 22:15:44 -07:00