@pentoshi/clai 4.8.0 → 4.8.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/agent/runner.js +3 -2
- package/dist/agent/runner.js.map +1 -1
- package/dist/classic/chrome/composer-controller.js +20 -6
- package/dist/classic/chrome/composer-controller.js.map +1 -1
- package/dist/llm/http.js +6 -3
- package/dist/llm/http.js.map +1 -1
- package/dist/llm/token-usage.js +10 -0
- package/dist/llm/token-usage.js.map +1 -1
- package/dist/tui-v2/components/completion/completion-menu.js +1 -1
- package/dist/tui-v2/components/completion/completion-menu.js.map +1 -1
- package/dist/tui-v2/composer/composer-editor.js +51 -18
- package/dist/tui-v2/composer/composer-editor.js.map +1 -1
- package/dist/ui-core/bootstrap/composition-root.js +0 -6
- package/dist/ui-core/bootstrap/composition-root.js.map +1 -1
- package/dist/ui-core/composer/completion.d.ts +6 -0
- package/dist/ui-core/composer/completion.js +24 -13
- package/dist/ui-core/composer/completion.js.map +1 -1
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/package.json +1 -1
package/dist/agent/runner.js
CHANGED
|
@@ -3156,11 +3156,12 @@ export async function runAgentTurn(prompt, options = {}) {
|
|
|
3156
3156
|
const turnTools = selectToolDefs(nativeToolsActive, useCompactSystemPrompt);
|
|
3157
3157
|
toolsAttached = Boolean(turnTools?.length);
|
|
3158
3158
|
const contextBreakdown = buildContextBreakdown(messages, toolsAttached ? turnTools : undefined);
|
|
3159
|
+
const estimatedInputTokens = estimateNextRequestTokens(messages);
|
|
3159
3160
|
// E4: advisory only — never blocks free-tier users.
|
|
3160
3161
|
if (!freeTierLargeContextWarned) {
|
|
3161
3162
|
const notices = freeTierGuardNotices({
|
|
3162
3163
|
provider,
|
|
3163
|
-
estimatedInputTokens
|
|
3164
|
+
estimatedInputTokens,
|
|
3164
3165
|
consecutiveFailures: freeTierConsecutiveFailures,
|
|
3165
3166
|
});
|
|
3166
3167
|
for (const notice of notices) {
|
|
@@ -3373,7 +3374,7 @@ export async function runAgentTurn(prompt, options = {}) {
|
|
|
3373
3374
|
if (!freeTierAdvisoryShown) {
|
|
3374
3375
|
for (const notice of freeTierGuardNotices({
|
|
3375
3376
|
provider,
|
|
3376
|
-
estimatedInputTokens
|
|
3377
|
+
estimatedInputTokens,
|
|
3377
3378
|
consecutiveFailures: freeTierConsecutiveFailures,
|
|
3378
3379
|
})) {
|
|
3379
3380
|
if (notice.includes("Large context"))
|