@staff0rd/assist 0.511.0 → 0.512.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/commands/sessions/web/bundle.js +432 -429
- package/dist/index.js +34 -1
- package/package.json +1 -1
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.512.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -30197,6 +30197,33 @@ function logSpawnedSession(session) {
|
|
|
30197
30197
|
);
|
|
30198
30198
|
}
|
|
30199
30199
|
|
|
30200
|
+
// src/commands/sessions/shared/isReferenceOnlyPrompt.ts
|
|
30201
|
+
var TRACKER_HOSTS = ["github.com", "atlassian.net", "slack.com"];
|
|
30202
|
+
var ISSUE_KEY = /^[A-Z][A-Z0-9]+-\d+$/;
|
|
30203
|
+
var HASH_NUMBER = /^#\d+$/;
|
|
30204
|
+
var ASSIST_ITEM_ID = /^a[0-9a-f]{2,}$/;
|
|
30205
|
+
function isReferenceOnlyPrompt(prompt) {
|
|
30206
|
+
const tokens = prompt.trim().split(/\s+/).filter(Boolean);
|
|
30207
|
+
if (tokens.length === 0) return false;
|
|
30208
|
+
return tokens.every(isReference);
|
|
30209
|
+
}
|
|
30210
|
+
function isReference(token) {
|
|
30211
|
+
return isTrackerUrl(token) || ISSUE_KEY.test(token) || HASH_NUMBER.test(token) || ASSIST_ITEM_ID.test(token);
|
|
30212
|
+
}
|
|
30213
|
+
function isTrackerUrl(token) {
|
|
30214
|
+
let host;
|
|
30215
|
+
try {
|
|
30216
|
+
const url = new URL(token);
|
|
30217
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return false;
|
|
30218
|
+
host = url.hostname.toLowerCase();
|
|
30219
|
+
} catch {
|
|
30220
|
+
return false;
|
|
30221
|
+
}
|
|
30222
|
+
return TRACKER_HOSTS.some(
|
|
30223
|
+
(tracker) => host === tracker || host.endsWith(`.${tracker}`)
|
|
30224
|
+
);
|
|
30225
|
+
}
|
|
30226
|
+
|
|
30200
30227
|
// src/commands/sessions/shared/sessionTitlePrompt.ts
|
|
30201
30228
|
function sessionTitlePrompt(session) {
|
|
30202
30229
|
if (session.commandType === "claude")
|
|
@@ -30281,6 +30308,12 @@ function startSessionTitleGeneration(session, notify2) {
|
|
|
30281
30308
|
return;
|
|
30282
30309
|
const prompt = sessionTitlePrompt(session);
|
|
30283
30310
|
if (!prompt) return;
|
|
30311
|
+
if (isReferenceOnlyPrompt(prompt)) {
|
|
30312
|
+
daemonLog(
|
|
30313
|
+
`session ${session.id} title deferred: prompt is a reference only (${prompt})`
|
|
30314
|
+
);
|
|
30315
|
+
return;
|
|
30316
|
+
}
|
|
30284
30317
|
runSessionTitleGeneration(session, prompt, notify2, singleLineTitle(prompt));
|
|
30285
30318
|
}
|
|
30286
30319
|
|