CommandDash / commanddash

AI assist to integrate APIs and SDKs without reading docs.

Home Page:https://commanddash.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feat]: Contextual Code Additions.

samyakkkk opened this issue · comments

Is your feature request related to a problem?

FlutterGPT currently passes contextual code of all classes/methods referred in the current file by fetching it with Dart Analysis Server.

However, for optimisation reasons, we just limit ourselves to the code inside the current project. This could be a problem when users are using submodules or are using new versions of packages or unpopular packages not understood by the default model.****

Describe the solution that you'd like

We need a smart algorithm to figure out what context to include and not include and also assign weightage to each of them so we can shortlist or filter when running short on token limit.

Let's think of all possible cases, - including when using stateful widgets, variables, generated code, packages code etc. and how to include them.

Describe alternatives that you have considered

No response

Additional Information

No response

Acceptance Criteria

After thorough discussion and once approved by everyone in the team, then only we will start to implement.

Putting all contextual code that should be included in order of priority:

  • From the current project
  • From other local projects (submodules etc).
  • From published packages.

What to include depending on if the code object is from 1,2 or 3.

  • Entire Code File [1] [10000 tokens truncated]
  • Entire Code Object [2] [8000 tokens truncated]
  • Only the used function with other function signatures [6000 tokens truncated]

(Open to further suggestions)