diff --git a/.prompts/project-info.prompttemplate b/.prompts/project-info.prompttemplate index 0cb9e4010db56..b357d9ccbdda1 100644 --- a/.prompts/project-info.prompttemplate +++ b/.prompts/project-info.prompttemplate @@ -61,6 +61,10 @@ Use `npm` (not `yarn`) for all package management and script execution. If you want to compile something, run the linter or tests, prefer to execute them for changed packages first, as they will run faster. Only build the full project once you are done for a final validation. There are usually pre-defined tasks for all these operations, prefer to use these instead of npm directly. +### Start Theia + +To start Theia as a browser app to show something to the user or for UI testing use the launch config "Start Theia Default (Browser backend, no debug)" + ### Preferences Theia uses a preferences system for user/workspace settings. To add new preferences: diff --git a/.vscode/launch.json b/.vscode/launch.json index ee1cb6bc6fc38..7ad078e500b24 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -64,6 +64,18 @@ "internalConsoleOptions": "openOnSessionStart", "outputCapture": "std" }, + { + "type": "node", + "request": "launch", + "name": "Start Theia Default (Browser backend, no debug)", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run", + "start:browser" + ], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal" + }, { "type": "node", "request": "launch", diff --git a/packages/ai-ide/src/common/coder-replace-prompt-template.ts b/packages/ai-ide/src/common/coder-replace-prompt-template.ts index a328e80fbbc08..c75048644fbc7 100644 --- a/packages/ai-ide/src/common/coder-replace-prompt-template.ts +++ b/packages/ai-ide/src/common/coder-replace-prompt-template.ts @@ -18,7 +18,10 @@ import { SEARCH_IN_WORKSPACE_FUNCTION_ID, FIND_FILES_BY_PATTERN_FUNCTION_ID, LIST_TASKS_FUNCTION_ID, - RUN_TASK_FUNCTION_ID + RUN_TASK_FUNCTION_ID, + LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID, + RUN_LAUNCH_CONFIGURATION_FUNCTION_ID, + STOP_LAUNCH_CONFIGURATION_FUNCTION_ID } from './workspace-functions'; import { TODO_WRITE_FUNCTION_ID } from './todo-tool'; import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from './context-variables'; @@ -151,6 +154,15 @@ If no relevant tests exist for your changes: - Follow patterns from existing tests in the codebase - Ensure new tests validate the new behavior and prevent regressions +## Running Applications +Running tasks will not return until a task is done. To launch an application so that the user \ +or an agent can test it or interact with it continuously, use launch configurations instead. +- ~{${LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} — list all available launch configs and their state (running or not) +- ~{${RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}} — start a launch configuration (returns immediately, app runs in background) +- ~{${STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} — stop a running launch configuration + +Launch configurations are defined in \`.vscode/launch.json\`. If none exist or you need to inspect/modify them, read or create this file. + ## Progress Tracking - ~{${TODO_WRITE_FUNCTION_ID}} — track task progress with a todo list visible to the user