getappmap / getappmap/appmap-js

Navie misunderstands the intended file path

Open
#2,063 2 comments 0 reactions 4 assignees View on GitHub

@dustinbyrne is already working on this.

Since Oct 13, 2024.

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

Description

Instructed to specifically generate code for a full file path:

@generate /Users/kgilpin/source/appland/appmap-js/packages/search/src/snippet-index.ts

When Navie lists files, non-file names are detected as files, and the actual file name is not detected. Navie then emits changes to the wrong file.

73909 [Stderr] Tokens (prompt/compl/total): 0/0/0
73909 [Stderr] List files response:
73909 [Stderr] ```json
73909 [Stderr] [
73909 [Stderr]   "snippet_content",
73909 [Stderr]   "snippet_boost",
73909 [Stderr]   "file_content",
73909 [Stderr]   "file_boost"
73909 [Stderr] ]
73909 [Stderr] ```
73909 [Stderr] Explain received context request: search
73909 [Stderr] Collecting context with parameters: sourceDirectories: /Users/kgilpin/source/appland/appmap-js/packages/search, charLimit: 0, locations: snippet_content, snippet_boost, file_content, file_boost
73909 [Stderr] Parsed locations: snippet_content, snippet_boost, file_content, file_boost
73909 [Stdout] [context-service] Retrieving full context of files: snippet_content, snippet_boost, file_content, file_boost
73909 [Stderr] No context found
73909 [Stdout] [context-service] Added 0 characters of file context
73909 [Stdout] [context-service] Searching for context
73909 [Stderr] Tokens (prompt/compl/total): 0/0/0
73909 [Stderr] Vector terms response:
73909 [Stderr] Context: auth
73909 [Stderr] Instructions: Search for matching snippets
73909 [Stderr] ---
73909 [Stderr] Terms: +auth authentication authorization boost score fts5 sql
73909 [Stderr] Explain received context request: search
73909 [Stderr] Collecting context with parameters: sourceDirectories: /Users/kgilpin/source/appland/appmap-js/packages/search, charLimit: 48018, keywords: auth, authentication, authorization, boost, score, fts5, sql, labels: explain(high), feature(high)

If I change the question to @generate src/snippet-index.ts, then I get a listing of the full code and the UI shows the correct file path, but clicking the "Apply" button results in the wavy "apply" animation and then the checkmark, but the file is not modified. The initial file contents is simply:

// TODO
Screen Shot 2024-10-13 at 9 02 48 AM Screen Shot 2024-10-13 at 9 03 56 AM

Trajectory

4861736c-8592-40a4-a2ef-c0dc5863fd9c.zip


Plan solution in the navie package only.

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.