mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-31 06:02:47 -07:00
fix(watcher): sync primaryUserGoal field rename across codebase
This commit is contained in:
@@ -106,7 +106,7 @@ export interface SubagentProgress {
|
||||
}
|
||||
|
||||
export interface WatcherProgress {
|
||||
userDirections: string;
|
||||
primaryUserGoal: string;
|
||||
progressSummary: string;
|
||||
evaluation: string;
|
||||
feedback?: string;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { GEMINI_MODEL_ALIAS_FLASH } from '../config/models.js';
|
||||
import * as path from 'node:path';
|
||||
|
||||
export const WatcherReportSchema = z.object({
|
||||
userDirections: z
|
||||
primaryUserGoal: z
|
||||
.string()
|
||||
.describe(
|
||||
'High level user directions/redirections and any change of plans.',
|
||||
@@ -142,14 +142,14 @@ Analyze the recent history against the North Star. Actively look for anti-patter
|
||||
|
||||
*(Note: If this is a Standalone Short-Horizon task with no ongoing goal, just set all fields to "EMPTY" or "N/A" and omit feedback.)*
|
||||
|
||||
* \`userDirections\`: Any parsed _strategic_ changes, or note if the user transitioned/aborted tasks.
|
||||
* \`progressSummary\`: Brief text of what was achieved, or "N/A" for short-horizon.
|
||||
* \`primaryUserGoal\`: A concise, 1-2 sentence strictly HIGH LEVEL GOAL. Any parsed _strategic_ changes, or note if the user transitioned/aborted tasks.
|
||||
* \`progressSummary\`: Brief text of what was achieved, or "N/A" for short-horizon. Use bullet points.
|
||||
* \`evaluation\`: "ON_TRACK", "DEVIATING", "STUCK", "LOOPING", or "NOT_APPLICABLE".
|
||||
* \`feedback\`:
|
||||
* **If Short-Horizon or ON_TRACK**: Leave empty.
|
||||
* **If DEVIATING/STUCK/LOOPING**: Provide a strong, authoritative directive to the main agent. (e.g., _"WARNING: You are in a loop trying to fix test_utils.py. The original goal is to build the API endpoint. Revert your last change, ignore the test warning for now, and return to the API endpoint."_)
|
||||
* \`feedback\`: **CRITICAL: THIS IS INJECTED INTO THE AGENT'S CHAT HISTORY.**
|
||||
* **If Short-Horizon or ON_TRACK**: You MUST leave this field empty.
|
||||
* **If DEVIATING/STUCK/LOOPING**: Provide a strong, authoritative directive to the main agent. (e.g., _"WARNING: You are hyper fixating on fixing test_utils.py and looping as a result. The original goal is to build the API endpoint. Revert your last change, ignore the test warning for now, and return to the API endpoint."_). If the agent is truly stuck, provide the directive to stop unless the agent can get new information.
|
||||
|
||||
You MUST call \`complete_task\` with a JSON report containing \`userDirections\`, \`progressSummary\`, \`evaluation\`, and optional \`feedback\`.`,
|
||||
You MUST call \`complete_task\` with a JSON report containing \`primaryUserGoal\`, \`progressSummary\`, \`evaluation\`, and optional \`feedback\`.`,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1423,8 +1423,8 @@ export class GeminiClient {
|
||||
const reportLines = [
|
||||
'# Watcher Memory State',
|
||||
'',
|
||||
'## 1. User Directions',
|
||||
parsed.userDirections,
|
||||
'## 1. Primary User Goal',
|
||||
parsed.primaryUserGoal,
|
||||
'',
|
||||
'## 2. Progress Summary',
|
||||
parsed.progressSummary,
|
||||
|
||||
@@ -87,7 +87,7 @@ describe('GeminiClient Watcher Integration', () => {
|
||||
vi.spyOn(config, 'getApprovalMode').mockReturnValue(ApprovalMode.DEFAULT);
|
||||
|
||||
const mockWatcherTool = createMockWatcherTool({
|
||||
userDirections: 'Keep testing',
|
||||
primaryUserGoal: 'Keep testing',
|
||||
progressSummary: 'Test in progress',
|
||||
evaluation: 'Good',
|
||||
feedback: 'Keep going',
|
||||
@@ -204,7 +204,7 @@ describe('GeminiClient Watcher Integration', () => {
|
||||
vi.spyOn(config, 'getApprovalMode').mockReturnValue(ApprovalMode.DEFAULT);
|
||||
|
||||
const mockWatcherTool = createMockWatcherTool({
|
||||
userDirections: 'Keep testing',
|
||||
primaryUserGoal: 'Keep testing',
|
||||
progressSummary: 'Test in progress',
|
||||
evaluation: 'Good',
|
||||
feedback: 'Keep going',
|
||||
@@ -278,7 +278,7 @@ describe('GeminiClient Watcher Integration', () => {
|
||||
vi.spyOn(config, 'getApprovalMode').mockReturnValue(ApprovalMode.DEFAULT);
|
||||
|
||||
const reportData = {
|
||||
userDirections: 'Messy test direction',
|
||||
primaryUserGoal: 'Messy test direction',
|
||||
progressSummary: 'Messy progress',
|
||||
evaluation: 'ON_TRACK',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user