getappmap / getappmap/appmap-js

@generate command should update a pinned file as prompted

Open
#2,061 0 comments 0 reactions 3 assignees View on GitHub

@dustinbyrne is already working on this.

Since Oct 11, 2024.

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

Description

I have a Mermaid ERD and a models.py with data classes that correspond to the diagram:

Archive.zip

Then I update the ERD and attach both the ERD and the models.py as Pinned files to Navie. Then I ask Navie:

@generate update models to match the schema

Navie updates a different, unrelated file.

Screen Shot 2024-10-11 at 8.51.58 AM.zip

Navie should understand which file I am trying to update per my prompt. The full-text of that file should be fetched or used and updated according to the expected @generate behavior.

Navie log (note that the "List files response" is empty):

77824 [Stdout] [local-navie] Processing question 1f2b9d5c-32ab-4286-8dbd-7f6b9a289d34 in thread ba90908d-fea5-45aa-9562-e7831137bd54
77824 [Stderr] Using OpenAI backend
77824 [Stderr] User option format=xml
77824 [Stderr] Explain received context request: projectInfo
77824 [Stdout] Project info obtained
77824 [Stderr] Tokens (prompt/compl/total): 0/0/0
77824 [Stderr] Question: @generate update models to match the schema
77824 [Stderr] Classification: feature=high
77824 [Stdout] [mode-selection] Activating agent due to question prefix: generate
77824 [Stderr] Tokens (prompt/compl/total): 0/0/0
77824 [Stderr] List files response:
77824 [Stderr] ```json
77824 [Stderr] []
77824 [Stderr] ```
77824 [Stdout] [context-service] No file names provided for location context
77824 [Stdout] [context-service] Searching for context
77824 [Stderr] Tokens (prompt/compl/total): 0/0/0
77824 [Stderr] Vector terms response:
77824 [Stderr] Context: Update models match schema
77824 [Stderr] Instructions: Update models according to the provided schema
77824 [Stderr] ---
77824 [Stderr] Terms: update +models match schema synchronize
77824 [Stderr] 
77824 [Stderr] --- 
77824 [Stderr] 
77824 [Stderr] Updated models:
77824 [Stderr] 
77824 [Stderr] ```python
77824 [Stderr] from dataclasses import dataclass
77824 [Stderr] from datetime import datetime
77824 [Stderr] from typing import List, Optional
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class CatalogueProduct:
77824 [Stderr]     id: int
77824 [Stderr]     structure: str
77824 [Stderr]     is_public: bool
77824 [Stderr]     upc: str
77824 [Stderr]     parent_id: Optional[int]
77824 [Stderr]     title: str
77824 [Stderr]     slug: str
77824 [Stderr]     description: str
77824 [Stderr]     meta_title: Optional[str]
77824 [Stderr]     meta_description: Optional[str]
77824 [Stderr]     product_class_id: int
77824 [Stderr]     rating: Optional[float]
77824 [Stderr]     date_created: datetime
77824 [Stderr]     date_updated: datetime
77824 [Stderr]     is_discountable: bool
77824 [Stderr]     base_price: float
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class CatalogueCategory:
77824 [Stderr]     id: int
77824 [Stderr]     path: str
77824 [Stderr]     depth: int
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class OfferRangeClasses:
77824 [Stderr]     id: int
77824 [Stderr]     range_id: int
77824 [Stderr]     productclass_id: int
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class OfferRangeProduct:
77824 [Stderr]     id: int
77824 [Stderr]     range_id: int
77824 [Stderr]     product_id: int
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class CatalogueProductCategory:
77824 [Stderr]     id: int
77824 [Stderr]     category_id: int
77824 [Stderr]     product_id: int
77824 [Stderr] 
77824 [Stderr] 
77824 [Stderr] @dataclass
77824 [Stderr] class CatalogueCategoryProductCategory(CatalogueCategory):
77824 [Stderr]     included_product: List[CatalogueProductCategory] = None
77824 [Stderr] 
77824 [Stderr] ```
77824 [Stderr] Explain received context request: search
77824 [Stderr] Collecting context with parameters: sourceDirectories: /Users/kgilpin/source/land-of-apps/django-oscar_issue16, charLimit: 12615, appmapDirectories: /Users/kgilpin/source/land-of-apps/django-oscar_issue16, keywords: update, models, match, schema, synchronize, updated, models, python, dataclasses, import, dataclass, datetime, typing, list, optional, dataclass, class, catalogue, product, catalogueproduct, id, int, structure, str, public, ispublic, bool, upc, parent, id, parentid, optional, int, title, slug, description, meta, title, metatitle, optional, str, meta, description, metadescription, product, class, productclass, id, classid, rating, optional, float, date, created, datecreated, date, updated, dateupdated, discountable, isdiscountable, base, price, baseprice, float, catalogue, category, cataloguecategory, path, depth, offer, range, offerrange, classes, rangeclasses, range, id, rangeid, productclass, id, productclassid, offer, range, offerrange, product, rangeproduct, product, id, productid, catalogue, product, catalogueproduct, category, productcategory, category, id, categoryid, catalogue, category, cataloguecategory, product, categoryproduct, category, productcategory, catalogue, category, cataloguecategory, included, product, includedproduct, list, catalogue, product, catalogueproduct, category, productcategory, none, labels: feature(high)
77824 [Stdout] Indexed 1529 files in /Users/kgilpin/source/land-of-apps/django-oscar_issue16 in 472ms
77824 [Stdout] Wrote file index to /var/folders/mp/5v5n_rwj5_1___9fxxwf_msr0000gn/T/appmap-files-17286615639615UK6n3/index.sqlite
77824 [Stdout] [search-context] Requested char limit: 12615
77824 [Stdout] [search-context] Collecting context with 5 events per diagram.
77824 [Stdout] Wrote file index to /var/folders/mp/5v5n_rwj5_1___9fxxwf_msr0000gn/T/appmap-source-1728661564897xpNsFl/index.sqlite
77824 [Stdout] Remaining characters before context: 12615
77824 [Stdout] Characterlimit reached.
77824 [Stdout] Added 13082 characters out of a requested limit of 12615.
77824 [Stdout] [search-context] Collected an estimated 13082 characters.
77824 [Stdout] Remaining characters before context: 12615
77824 [Stdout] Characterlimit reached.
77824 [Stdout] Added 13082 characters out of a requested limit of 12615.
77824 [Stdout] Remaining characters after context: -467
77824 [Stderr] Tokens (prompt/compl/total): 0/0/0
77824 [Stderr] [local-navie] Completed question 1f2b9d5c-32ab-4286-8dbd-7f6b9a289d34 in 43693ms
77824 [Stdout] [local-navie] Processing question ae3e6b3f-35fa-4960-a6f5-60d995692846 in thread ba90908d-fea5-45aa-9562-e7831137bd54
77824 [Stderr] Using OpenAI backend
77824 [Stderr] User option context=false
77824 [Stderr] User option help=false
77824 [Stderr] [local-navie] Completed question ae3e6b3f-35fa-4960-a6f5-60d995692846 in 5768ms

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.