getappmap / getappmap/appmap-js

File index can miss defined constants

Open
#2,038 2 comments 0 reactions 2 assignees View on GitHub

@dustinbyrne is already working on this.

Since Oct 3, 2024.

bug navie-plan
Dominant language
TypeScript
Stars
53
Forks
18
Avg merge
3d 18h
Merged PRs (30d)
8

Description

2024-10-03T17:03:39.011Z appmap:file-index Indexing file path src/services/chatCompletion.ts with terms src services chat completion chatcompletion ts ai ai aichat aichat availability await chat chat chat chat chat chat chat chatcompletion chatcompletion chatcompletion chatcompletion chatcompletion chatcompletion chatcompletion check checkavailability chunk chunk codemessages completion completion completion completion completion completion completion completionchunk completionchunk completionresponse dispose handle handlerequest initialize key make makechat message messages models open open openai openai port prepare preparechat random randomkey ready refresh refreshmodels request response send sendchat stream streamchat tovs url vs vscode

This file contains the following code:

  get env(): Record<string, string> {
    const pref = ChatCompletion.preferredModel;
    return {
      OPENAI_API_KEY: this.key,
      OPENAI_BASE_URL: this.url,
      APPMAP_NAVIE_TOKEN_LIMIT: String(pref?.maxInputTokens ?? 3926),
      APPMAP_NAVIE_MODEL: pref?.family ?? 'gpt-4o',
    };
  }

Note that none of appmap navie token limit are present in the index.

--

querySymbols function should identify all symbols present in the code.

We should consider simply indexing the entire file as text. We will pull in some additional matches based on code comments, but that may be a net gain anyway.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.