Added resolveContextExpression command: posts current line/routine to API, inserts returned code on success, shows error otherwise.#7
Conversation
ricxJr
commented
Sep 23, 2025
- Funcionalidade: comando resolveContextExpression (Ajuda de Contexto).
- Atalho: Ctrl+Alt+Space (Win/Linux) / Cmd+Alt+Space (macOS).
- Ação: envia linha/seleção + routine para a API IRIS.
- Endpoint: POST /api/sourcecontrol/vscode/resolveContextExpression.
- Auth: Basic Auth usando servidor ativo (AtelierAPI).
- Sucesso: insere textExpression na linha atual (normaliza EOL).
- Erro: mostra notificação no VS Code.
- Telemetria: evento resolveContextExpression.
- SSL: respeita http.proxyStrictSSL.
- Arquivos: novo src/commands/contextHelp.ts; registros em extension.ts e package.json.
…PI and insert returned code
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| const routine = path.basename(document.fileName); | ||
| const api = new AtelierAPI(document.uri); | ||
| const { host, port, username, password, https: useHttps, pathPrefix } = api.config; | ||
|
|
There was a problem hiding this comment.
[P1] Send fully qualified routine name to context resolver
The payload builds routine with path.basename(document.fileName), so any package/class directory information (e.g. MyApp/Utils/Helper.cls) is reduced to just Helper.cls. The backend needs the fully qualified routine/class name to locate the source when resolving the expression, so the command will fail for the majority of ObjectScript files that live inside packages and always show an error. Derive the routine name the same way other commands do (convert the relative path to dotted class/routine name or reuse existing helpers) before calling the API.
Useful? React with 👍 / 👎.