Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Consider labels when providing the context #1730

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

kgilpin
Copy link
Contributor

@kgilpin kgilpin commented Apr 19, 2024

When providing the explain context, consider the labels that have been applied to the question by the AI classifier.

Initially, the behavior is this:

    if (
      labels.find((label) => label.name === 'architecture') ||
      labels.find((label) => label.name === 'overview')
    ) {
      keywords.push('architecture');
      keywords.push('design');
      keywords.push('readme');
      keywords.push('about');
      keywords.push('overview');
      for (const dir of this.projectDirectories) {
        keywords.push(basename(dir));
      }
    }

This is an effort to focus on high-level documentation and content that contains the name of the project itself.

In my ad-hoc testing, the classifier has done a good job of applying the "architecture" and "overview" labels. We should reflect these labels back to the user in the context view also (RHS of the Navie UI).

@kgilpin kgilpin self-assigned this Apr 19, 2024
@kgilpin kgilpin added the enhancement New feature or request label Apr 19, 2024
Copy link

github-actions bot commented Apr 19, 2024

AppMap runtime code review

Summary Status
Failed tests ✅ All tests passed
API changes 0️⃣ No API changes
Security flaws ✅ None detected
Performance problems ✅ None detected
Code anti-patterns 🚨 4 new 🎉 4 resolved
New AppMaps ⭐ 10 new jest tests
Removed AppMaps ✖️ 2 removed jest tests

Code anti-patterns

🚨 New problems detected (4)

Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace

🎉 Problems resolved (4)

Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace
Unfulfilled Promise
Description

Unfulfilled Promise

Field Value
Rule unfulfilled-promise
Impact domain
View in AppMap
Stack trace

⭐ New AppMaps

[jest] ContextCollector collectContext appmaps handles search across all appmaps

[jest] ContextCollector collectContext appmaps returns context for specified appmaps

[jest] FileIndex when matches are found does not match directory nanmes

[jest] FileIndex when matches are found matches alphanumeric file names

[jest] FileIndex when matches are found returns matching file names

[jest] listGitProjectFiles includes non-binary git-managed files and filters out binary and unmanaged files

[jest] listProjectFiles identifies binary files correctly

[jest] listProjectFiles ignores directories specified in IGNORE DIRECTORIES

[jest] listProjectFiles lists all non-binary, non-ignored files in a directory

[jest] SourceIndex when matches are found returns matching source code snippets

✖️ Removed AppMaps

[jest] ContextCollector collectContext handles search across all appmaps

[jest] ContextCollector collectContext returns context for specified appmaps

@kgilpin kgilpin force-pushed the feat/explain-context-labels branch from 88f7912 to 72e7ec1 Compare April 19, 2024 13:45
@kgilpin kgilpin marked this pull request as ready for review April 19, 2024 13:53
@kgilpin kgilpin added the build native Build and save native packages in the GitHub workflow label Apr 19, 2024
@kgilpin kgilpin force-pushed the feat/answer-without-appmaps branch 2 times, most recently from 4056467 to 3f6a5b6 Compare April 19, 2024 22:18
@kgilpin kgilpin force-pushed the feat/explain-context-labels branch from e7e3e91 to 4d4418c Compare April 19, 2024 22:22
@kgilpin kgilpin merged commit 2ed0d8a into feat/answer-without-appmaps Apr 19, 2024
2 of 3 checks passed
@kgilpin kgilpin deleted the feat/explain-context-labels branch April 19, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build native Build and save native packages in the GitHub workflow enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant