@staff0rd/assist 0.514.1 → 0.515.0
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/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.515.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -107,6 +107,7 @@ var package_default = {
|
|
|
107
107
|
jscpd: "^4.0.5",
|
|
108
108
|
jsdom: "^29.1.1",
|
|
109
109
|
knip: "^5.71.0",
|
|
110
|
+
"monaco-editor": "^0.56.0",
|
|
110
111
|
oxfmt: "^0.54.0",
|
|
111
112
|
oxlint: "^1.69.0",
|
|
112
113
|
react: "^19.2.4",
|
|
@@ -12081,6 +12082,19 @@ var routes2 = {
|
|
|
12081
12082
|
"commands/sessions/web/bundle.css",
|
|
12082
12083
|
"text/css"
|
|
12083
12084
|
),
|
|
12085
|
+
"GET /monaco.js": createBundleHandler(
|
|
12086
|
+
import.meta.url,
|
|
12087
|
+
"commands/sessions/web/monaco.js"
|
|
12088
|
+
),
|
|
12089
|
+
"GET /monaco.worker.js": createBundleHandler(
|
|
12090
|
+
import.meta.url,
|
|
12091
|
+
"commands/sessions/web/monaco.worker.js"
|
|
12092
|
+
),
|
|
12093
|
+
"GET /monaco.css": createBundleHandler(
|
|
12094
|
+
import.meta.url,
|
|
12095
|
+
"commands/sessions/web/monaco.css",
|
|
12096
|
+
"text/css"
|
|
12097
|
+
),
|
|
12084
12098
|
"GET /api/items": listItems,
|
|
12085
12099
|
"GET /api/backlog/summary": getBacklogSummary,
|
|
12086
12100
|
"POST /api/open-in-code": openInCode,
|
|
@@ -30317,7 +30331,7 @@ var ASSIST_ITEM_ID = /^a[0-9a-f]{2,}$/;
|
|
|
30317
30331
|
function isReferenceOnlyPrompt(prompt) {
|
|
30318
30332
|
const tokens = prompt.trim().split(/\s+/).filter(Boolean);
|
|
30319
30333
|
if (tokens.length === 0) return false;
|
|
30320
|
-
return tokens.every(isReference);
|
|
30334
|
+
return tokens.some(isTrackerUrl) || tokens.every(isReference);
|
|
30321
30335
|
}
|
|
30322
30336
|
function isReference(token) {
|
|
30323
30337
|
return isTrackerUrl(token) || ISSUE_KEY.test(token) || HASH_NUMBER.test(token) || ASSIST_ITEM_ID.test(token);
|
|
@@ -30422,7 +30436,7 @@ function startSessionTitleGeneration(session, notify2) {
|
|
|
30422
30436
|
if (!prompt) return;
|
|
30423
30437
|
if (isReferenceOnlyPrompt(prompt)) {
|
|
30424
30438
|
daemonLog(
|
|
30425
|
-
`session ${session.id} title deferred: prompt is a reference
|
|
30439
|
+
`session ${session.id} title deferred pending context: prompt is a reference (${prompt})`
|
|
30426
30440
|
);
|
|
30427
30441
|
return;
|
|
30428
30442
|
}
|
|
@@ -33966,6 +33980,13 @@ import chalk213 from "chalk";
|
|
|
33966
33980
|
// src/shared/rateLimitLevel.ts
|
|
33967
33981
|
var FIVE_HOUR_SECONDS = 5 * 3600;
|
|
33968
33982
|
var SEVEN_DAY_SECONDS = 7 * 86400;
|
|
33983
|
+
function rateLimitElapsedFraction(resetsAt, windowSeconds, now) {
|
|
33984
|
+
if (resetsAt == null) return void 0;
|
|
33985
|
+
const timeRemaining = Math.max(0, resetsAt - now);
|
|
33986
|
+
const elapsed = Math.max(0, windowSeconds - timeRemaining) / windowSeconds;
|
|
33987
|
+
if (elapsed < 0.05) return void 0;
|
|
33988
|
+
return elapsed;
|
|
33989
|
+
}
|
|
33969
33990
|
function formatRateLimitTimeLeft(resetsAt, now) {
|
|
33970
33991
|
const seconds = Math.max(0, resetsAt - now);
|
|
33971
33992
|
const days = Math.floor(seconds / 86400);
|
|
@@ -33976,10 +33997,8 @@ function formatRateLimitTimeLeft(resetsAt, now) {
|
|
|
33976
33997
|
return `${minutes}m`;
|
|
33977
33998
|
}
|
|
33978
33999
|
function projectUsage(pct, resetsAt, windowSeconds, now) {
|
|
33979
|
-
|
|
33980
|
-
|
|
33981
|
-
const elapsed = Math.max(0, windowSeconds - timeRemaining) / windowSeconds;
|
|
33982
|
-
if (elapsed < 0.05) return void 0;
|
|
34000
|
+
const elapsed = rateLimitElapsedFraction(resetsAt, windowSeconds, now);
|
|
34001
|
+
if (elapsed == null) return void 0;
|
|
33983
34002
|
return pct / elapsed;
|
|
33984
34003
|
}
|
|
33985
34004
|
function rateLimitLevel(pct, resetsAt, windowSeconds, now) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staff0rd/assist",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.515.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"jscpd": "^4.0.5",
|
|
102
102
|
"jsdom": "^29.1.1",
|
|
103
103
|
"knip": "^5.71.0",
|
|
104
|
+
"monaco-editor": "^0.56.0",
|
|
104
105
|
"oxfmt": "^0.54.0",
|
|
105
106
|
"oxlint": "^1.69.0",
|
|
106
107
|
"react": "^19.2.4",
|