getappmap / getappmap/appmap-js

Pinned items are transmitted to Navie as "code selection" and therefore don't work well as custom prompts

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

Nobody has claimed this yet.

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

Description

Looking at code in Navie like openai-completion-service:

  async *complete(messages: readonly Message[], options?: CompleteOptions): Completion {
    const tokens = new Array<string>();
    const model = options?.model ?? this.model.modelName;
    const isO1 = this.modelName.startsWith('o1-');
    const usage = new Usage(COST_PER_M_TOKEN[model]);
    let sentMessages: Message[] = mergeSystemMessages(messages);

The code selection are passed in as <code-selection>...</code-selection> messages. So when I try and pass in a prompt as a code selection (pinned file), Navie doesn't treat the pinned file as a custom prompt; it's treated as a "code selection".

Example prompt:

Create types to represent all the code that you find in the search context.

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.

Research direction

Start by tracing how pinned items reach Navie and how openai-completion-service handles the code-selection messages shown in the issue. Confirm that a pinned custom prompt is transmitted and interpreted as a prompt rather than as code selection, then verify the example prompt behaves accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.