Name agents by their first prompt line instead of an LLM summary (#1563)
* Name agents by their first prompt line instead of an LLM summary The workspace title already captures the task; the LLM-generated agent title just restated the same prompt. Drop the generator and keep the provisional title (first prompt line), so the agent label stays deterministic and explicit titles still win. * Remove the no-op agent-title setting and leftover generator plumbing Deleting the agent-title generator left its whole surface dangling: a configurable "Agent titles" project setting that no longer did anything, dead create-path plumbing, generator-only import/MCP deps, and the mock provider's agent-title parser. Remove all of it, plus a dead test mock and timing sleeps that guarded the deleted background job. Replace them with a no-mock lifecycle test asserting the title stays the first prompt line across create and settle. Old paseo.json files with metadataGeneration.agentTitle still parse via schema passthrough — see COMPAT(projectMetadataAgentTitle).
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export const MAX_EXPLICIT_AGENT_TITLE_CHARS = 200;
|
||||
export const MAX_AUTO_AGENT_TITLE_CHARS = 40;
|
||||
|
||||
@@ -37,7 +37,6 @@ describe("paseo config schema", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
branchName: { instructions: "Prefix branches with feat/." },
|
||||
commitMessage: { instructions: "Use imperative mood." },
|
||||
pullRequest: { instructions: "Include risk notes." },
|
||||
@@ -45,7 +44,6 @@ describe("paseo config schema", () => {
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
branchName: { instructions: "Prefix branches with feat/." },
|
||||
commitMessage: { instructions: "Use imperative mood." },
|
||||
pullRequest: { instructions: "Include risk notes." },
|
||||
@@ -56,29 +54,40 @@ describe("paseo config schema", () => {
|
||||
it("parses partial metadata generation instructions with missing entries undefined", () => {
|
||||
const parsed = PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Keep it short." },
|
||||
branchName: { instructions: "Keep it short." },
|
||||
},
|
||||
});
|
||||
|
||||
expect(parsed.metadataGeneration).toEqual({
|
||||
agentTitle: { instructions: "Keep it short." },
|
||||
branchName: { instructions: "Keep it short." },
|
||||
});
|
||||
expect(parsed.metadataGeneration?.branchName).toBeUndefined();
|
||||
expect(parsed.metadataGeneration?.commitMessage).toBeUndefined();
|
||||
expect(parsed.metadataGeneration?.pullRequest).toBeUndefined();
|
||||
});
|
||||
|
||||
it("preserves legacy agentTitle metadata instructions as passthrough", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("passes through unknown metadata generation fields", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
futureField: 42,
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
futureField: 42,
|
||||
},
|
||||
});
|
||||
@@ -88,7 +97,7 @@ describe("paseo config schema", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: {
|
||||
branchName: {
|
||||
instructions: "Use concise titles.",
|
||||
model: "haiku",
|
||||
},
|
||||
@@ -96,7 +105,7 @@ describe("paseo config schema", () => {
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: {
|
||||
branchName: {
|
||||
instructions: "Use concise titles.",
|
||||
model: "haiku",
|
||||
},
|
||||
@@ -108,17 +117,17 @@ describe("paseo config schema", () => {
|
||||
expect(
|
||||
PaseoConfigSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: 42 },
|
||||
branchName: { instructions: 42 },
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: {},
|
||||
branchName: {},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("raw schema preserves old-style config while accepting metadata generation", () => {
|
||||
it("raw schema preserves old-style config while accepting legacy agentTitle", () => {
|
||||
const config = {
|
||||
worktree: {
|
||||
setup: "npm install",
|
||||
@@ -132,6 +141,7 @@ describe("paseo config schema", () => {
|
||||
},
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: "Use concise titles." },
|
||||
branchName: { instructions: "Use concise branches." },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -142,12 +152,12 @@ describe("paseo config schema", () => {
|
||||
expect(
|
||||
PaseoConfigRawSchema.parse({
|
||||
metadataGeneration: {
|
||||
agentTitle: { instructions: 42 },
|
||||
branchName: { instructions: 42 },
|
||||
},
|
||||
}),
|
||||
).toEqual({
|
||||
metadataGeneration: {
|
||||
agentTitle: {},
|
||||
branchName: {},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,11 +39,12 @@ export const PaseoMetadataGenerationEntrySchema = z
|
||||
|
||||
export const PaseoMetadataGenerationSchema = z
|
||||
.object({
|
||||
agentTitle: PaseoMetadataGenerationEntrySchema.optional(),
|
||||
branchName: PaseoMetadataGenerationEntrySchema.optional(),
|
||||
commitMessage: PaseoMetadataGenerationEntrySchema.optional(),
|
||||
pullRequest: PaseoMetadataGenerationEntrySchema.optional(),
|
||||
})
|
||||
// COMPAT(projectMetadataAgentTitle): `agentTitle` project metadata prompts were removed
|
||||
// in v0.1.96; keep legacy paseo.json parseable until 2026-12-16.
|
||||
.passthrough()
|
||||
.catch({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user