Skip to content

Added resolveContextExpression command: posts current line/routine to API, inserts returned code on success, shows error otherwise.#7

Merged
ricxJr merged 2 commits intoprereleasefrom
context-expression-api
Sep 23, 2025
Merged

Added resolveContextExpression command: posts current line/routine to API, inserts returned code on success, shows error otherwise.#7
ricxJr merged 2 commits intoprereleasefrom
context-expression-api

Conversation

@ricxJr
Copy link
Collaborator

@ricxJr 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.

@ricxJr ricxJr added the enhancement New feature or request label Sep 23, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment on lines +31 to +34
const routine = path.basename(document.fileName);
const api = new AtelierAPI(document.uri);
const { host, port, username, password, https: useHttps, pathPrefix } = api.config;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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 👍 / 👎.

@ricxJr ricxJr merged commit a47cb6e into prerelease Sep 23, 2025
1 check passed
@ricxJr ricxJr deleted the context-expression-api branch September 23, 2025 18:31
@ricxJr ricxJr restored the context-expression-api branch September 25, 2025 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant