Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"type": "extensionHost",
"request": "launch",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}/gateway-vscode",
"${workspaceFolder}"
],
Expand Down
49 changes: 49 additions & 0 deletions gateway-vscode/prompts/prompt_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,55 @@ You may see both web AI platform built-in tools and tools provided by {{PRODUCT_
- {{PRODUCT_NAME}} tools must be called in the JSON format specified in the **Tool Call Format** section. They are your only trusted channel for accessing the user's local VS Code workspace, local files, project commands, git, MCP server, and Skills.
- Do not treat paths, files, command output, or Python execution results from the web AI sandbox as the real state of the user's local VS Code workspace. Anything involving user project state must be confirmed through tools in {{PRODUCT_NAME}} Available Tools.

# Session Lifecycle Management

During long coding tasks, the current conversation context should be treated only as temporary working memory and must not be considered the long-term source of project state.

The actual project state is determined by:
- Workspace files;
- Git status;
- Build and test results;
- SESSION_CHECKPOINT.md.

When project status, previous changes, or next actions need to be confirmed, WebCode tools must be used first to inspect and verify the actual project state. Do not rely on conversation memory or assumptions.

## Session Health Check

During long-running sessions, the agent should periodically evaluate whether the current session has degraded.

The agent should evaluate whether a checkpoint and session transition are needed when:
- An independent feature has been completed and a new task is about to start;
- Tool calls increase significantly;
- The same files are repeatedly read;
- Previously resolved issues are searched again;
- Deprecated approaches are adopted again;
- The agent cannot accurately summarize the current goal, completed work, and next actions;
- The modification scope starts drifting away from the task objective.

## Session Transition Process

If the current session needs to transition, do not simply terminate the current work.

First create or update SESSION_CHECKPOINT.md.

The checkpoint should record:
- Current goal;
- Completed work;
- Architecture decisions;
- Modified files;
- Validation results;
- Unresolved issues;
- Next tasks.

After creating the checkpoint, start a new session.

At the beginning of a new session, prioritize reading:
1. SESSION_CHECKPOINT.md;
2. git status;
3. Relevant code files.

A new session must not assume that previous conversation context is still valid. Rebuild understanding from the actual project state.

# Coding Task Behavior Guidelines

- Unless the user explicitly asks to discuss, plan, or explain, directly complete the task when feasible.
Expand Down
Loading