1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-08 00:29:54 +00:00

improvements

This commit is contained in:
2025-08-30 00:25:48 +02:00
parent c7c3bff2d8
commit be17a801f8
3 changed files with 15 additions and 8 deletions

View File

@@ -368,6 +368,8 @@ body:not(.loading) #loading {
width: calc(800px - 24px);
}
.message .tool.invalid,
.message .tool .result.error,
.message .text .error {
color: #ed8796;
}

View File

@@ -493,7 +493,7 @@
if (!only || only === "tool") {
if (this.#tool) {
const { name, args, result, cost } = this.#tool;
const { name, args, result, cost, invalid } = this.#tool;
const _name = this.#_tool.querySelector(".name"),
_arguments = this.#_tool.querySelector(".arguments"),
@@ -508,8 +508,11 @@
_cost.textContent = cost ? `${formatMoney(cost)}` : "";
_result.classList.toggle("error", result?.startsWith("error: "));
_result.innerHTML = render(result || "*processing*");
this.#_tool.classList.toggle("invalid", invalid);
this.#_tool.setAttribute("data-tool", name);
} else {
this.#_tool.removeAttribute("data-tool");