When the context items provided by user overflow the context length
and are truncated, it is very confusing for the user. This is a
first step that catches an common case at the least confusing
time - when the user is selecting a file. A more general check that
warns whenever the most recent message is truncated is something
that can be added later.
Granite-Code/granite-code#22
Add a streaming implementation of rich LLM logging to use
if we don't have the webview connected; it converts the
LLMInteractionItems into a human-readable stream with
timestamps, handling of overlapping interactions, and so
forth.
Use this for the binary.
Instead of treating LLM logging as simply writing lines of text
sequentially, emit a stream of typed data objects that include
rich information about the interaction, such as timestamps,
message types, tool calls, etc.
These are then collected by a new custom webview in the vscode
extension (the "Continue Console"), allowing a user or developer
to browse through the different interactions and view them in detail.
In progress interactions are now streamed live, instead of being held back
to avoid concurrency issues.
This webview could be also exposed for IntelliJ or file logging
could be reimplemented on top of the new framework.
We can't add citations to the rich log until we have them plumbed
through with the correct data types. That will happen when they
get added to the UI. Since the only appearance so far was in the
old text log, just revert the addition for now.
This reverts commit 6bc0bfc5f1.
When we catch/log/rethrow AbortError, throw it as itself, rather than
throw Error(e.message) so that outer callers can detect it by the
exception name.