@staff0rd/assist 0.994.0 → 0.996.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.994.0",
9
+ version: "0.996.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -15396,6 +15396,24 @@ function formatAskQuestionAnswers(questions, answers) {
15396
15396
  return `User has answered your questions: ${pairs}. You can now continue with the user's answers in mind.`;
15397
15397
  }
15398
15398
 
15399
+ // src/commands/askQuestion/rejectLongQuestions.ts
15400
+ var MAX_QUESTION_WORDS = 30;
15401
+ function countWords(text18) {
15402
+ return text18.split(/\s+/).filter(Boolean).length;
15403
+ }
15404
+ function rejectLongQuestions(questions) {
15405
+ const longQuestions = questions.map((q) => ({ header: q.header, words: countWords(q.question) })).filter((q) => q.words > MAX_QUESTION_WORDS);
15406
+ if (longQuestions.length === 0) return;
15407
+ console.error(
15408
+ [
15409
+ `Error: questions must be ${MAX_QUESTION_WORDS} words or fewer:`,
15410
+ ...longQuestions.map((q) => `- ${q.header}: ${q.words} words`),
15411
+ "Shorten these questions and re-run assist ask-question."
15412
+ ].join("\n")
15413
+ );
15414
+ process.exit(1);
15415
+ }
15416
+
15399
15417
  // src/commands/backlog/readJsonPayload.ts
15400
15418
  import { readFileSync as readFileSync21 } from "fs";
15401
15419
  import chalk38 from "chalk";
@@ -15478,6 +15496,7 @@ async function askQuestion(options2) {
15478
15496
  askQuestionInputSchema,
15479
15497
  "AskUserQuestion input"
15480
15498
  );
15499
+ rejectLongQuestions(questions);
15481
15500
  const sessionId = process.env.ASSIST_SESSION_ID;
15482
15501
  if (process.env.ASSIST_SESSION !== "1" || !sessionId)
15483
15502
  useBuiltIn("not running in an assist session");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.994.0",
3
+ "version": "0.996.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {