@yagni-app/code-staging 1.2.14-staging.2480.1 → 1.2.14-staging.2486.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.
|
@@ -113,7 +113,8 @@ export declare function commitTitle(ticket: string, ticketBrief?: string): strin
|
|
|
113
113
|
* The title a run with a plan and no ticket title commits under (the cloud
|
|
114
114
|
* session reads its ticket from a file): the line under the plan's Goal or
|
|
115
115
|
* Summary heading, else its first line of prose. Undefined when the plan has
|
|
116
|
-
* neither.
|
|
116
|
+
* neither. `>`-quoted lines (the host's "A person approved…" note) are never
|
|
117
|
+
* prose: the title starts at the plan's own text, not the note above it.
|
|
117
118
|
*/
|
|
118
119
|
export declare function planTitle(planText: string | undefined): string | undefined;
|
|
119
120
|
/**
|
|
@@ -102,11 +102,14 @@ function fromGoal(planText) {
|
|
|
102
102
|
* The title a run with a plan and no ticket title commits under (the cloud
|
|
103
103
|
* session reads its ticket from a file): the line under the plan's Goal or
|
|
104
104
|
* Summary heading, else its first line of prose. Undefined when the plan has
|
|
105
|
-
* neither.
|
|
105
|
+
* neither. `>`-quoted lines (the host's "A person approved…" note) are never
|
|
106
|
+
* prose: the title starts at the plan's own text, not the note above it.
|
|
106
107
|
*/
|
|
107
108
|
export function planTitle(planText) {
|
|
108
109
|
const lines = (planText ?? "").split("\n").map((line) => line.trim());
|
|
109
|
-
const prose = (from) => lines
|
|
110
|
+
const prose = (from) => lines
|
|
111
|
+
.slice(from)
|
|
112
|
+
.find((line) => line && !line.startsWith("#") && !line.startsWith("```") && !line.startsWith(">"));
|
|
110
113
|
const goal = lines.findIndex((line) => GOAL_HEADING.test(line));
|
|
111
114
|
const line = (goal >= 0 ? prose(goal + 1) : undefined) ?? prose(0);
|
|
112
115
|
const title = line
|
|
@@ -154,6 +157,9 @@ export function commitSubject(type, scope, title) {
|
|
|
154
157
|
*/
|
|
155
158
|
export function summarizePlan(planText, ticket) {
|
|
156
159
|
const flat = fromGoal(planText ?? "")
|
|
160
|
+
// The host's >-quoted note ("A person approved…") is never the plan: drop
|
|
161
|
+
// it before flattening, so it never becomes a sentence of the summary.
|
|
162
|
+
.replace(/^[ \t]*>.*$/gm, "")
|
|
157
163
|
.replace(/^#+\s*/gm, "")
|
|
158
164
|
.replace(/^\s*(?:[-*+]|\d+[.)])\s+/gm, "")
|
|
159
165
|
.replace(/`{1,3}/g, "")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.2.14-staging.
|
|
3
|
+
"version": "1.2.14-staging.2486.1",
|
|
4
4
|
"description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"turndown": "^7.2.4",
|
|
59
59
|
"typebox": "^1.3.15"
|
|
60
60
|
},
|
|
61
|
-
"yagniSourceSha": "
|
|
61
|
+
"yagniSourceSha": "07fc5f7bd90521093235a45d252e415e5b1e1d6b"
|
|
62
62
|
}
|