@cardinal4/opencode-tavily-quota 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tui.js +8 -1
- package/package.json +1 -1
package/dist/tui.js
CHANGED
|
@@ -103,10 +103,17 @@ function TavilyQuotaCommands(props) {
|
|
|
103
103
|
run: async () => {
|
|
104
104
|
const next = await props.refresh();
|
|
105
105
|
const message = next.status === "ready" ? `${formatRemaining(next.snapshot)} · ${formatPercent(next.snapshot.percentRemaining)} · ${formatResetLine()}` : next.status === "error" ? next.message : "still loading…";
|
|
106
|
+
// Tie the toast to the open session so the host can title it and offer
|
|
107
|
+
// to open it if the session's family is not on screen.
|
|
108
|
+
const route = props.context.ui.router.current();
|
|
109
|
+
const sessionID = route.type === "session" ? route.sessionID : undefined;
|
|
106
110
|
props.context.ui.toast.show({
|
|
107
111
|
title: "Tavily quota",
|
|
108
112
|
message,
|
|
109
|
-
variant: next.status === "error" ? "error" : "info"
|
|
113
|
+
variant: next.status === "error" ? "error" : "info",
|
|
114
|
+
...(sessionID ? {
|
|
115
|
+
sessionID
|
|
116
|
+
} : {})
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
119
|
}]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@cardinal4/opencode-tavily-quota",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"description": "OpenCode 2 TUI plugin that shows remaining Tavily API credits in the sidebar.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|