Skip to content

feat: Sourcegraph Amp module #257

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

Harsh9485
Copy link

@Harsh9485 Harsh9485 commented Jul 29, 2025

Closes #238
/claim #238

Description

Video - https://www.loom.com/share/59e80a7fa3e54973bb0318132bc849a7?sid=4900077a-6fdb-4760-978c-9ad2e2daa9d8

Screenshot 2025-08-02 164234

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Module Information

Path: registry/harsh9485]/modules/sourcegraph_amp
New version: v1.0.0
Breaking change: [ ] Yes [x] No

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

Related Issues

@algora-pbc algora-pbc bot mentioned this pull request Jul 29, 2025
6 tasks
@Harsh9485
Copy link
Author

This PR is not ready for review because I’m facing an error, which I’ve fully described on Discord. I’d really appreciate it if you could help me solve it.

https://discord.com/channels/747933592273027093/1143265221545316445/1398733269096337478

@matifali matifali requested a review from hugodutka July 29, 2025 10:43
@matifali matifali requested a review from DevelopmentCats July 29, 2025 16:17
@Harsh9485 Harsh9485 changed the title Add Sourcegraph Amp module feat: Sourcegraph Amp module Aug 2, 2025
@Harsh9485
Copy link
Author

@hugodutka @matifali @bpmct @DevelopmentCats
The test suite isn’t ready for review yet, but the Sourcegraph AMP module is working. Do I need to add a system prompt, or is it okay to skip it?

@Harsh9485
Copy link
Author

@hugodutka @matifali @bpmct @DevelopmentCats
The PR is ready for review.

@hugodutka
Copy link
Contributor

hey @Harsh9485, I haven't reviewed the PR yet, but before I do - agentapi does not officially support Sourcegraph AMP yet. It might just work out of the box, but we'd need to add Sourcegraph AMP-specific tests to https://github.com/coder/agentapi before merging this PR. Here's how to add them: coder/agentapi#32 (review)

@Harsh9485
Copy link
Author

we'd need to add Sourcegraph AMP-specific tests

Ah, so you’re saying I should be the one to add the tests? 😅

@Harsh9485
Copy link
Author

Hey @hugodutka,

I reviewed the PR and understood what the tests are meant for. They make sense for Gemini since it has a lot of repetitive text, but in the case of AMP, it uses a simpler design and doesn’t have repetitive text patterns that match the test structure.

@bpmct mentioned modifying coder/agentAPI if needed to support Sourcegraph AMP.
If these tests are really required, I’d be happy to add them.

Screenshot 2025-08-04 211913

@hugodutka
Copy link
Contributor

@Harsh9485 we do need the tests, the sourcegraph-amp agent type in agentapi, and a README update to mention it's supported. It should be a straightforward PR.

@Harsh9485
Copy link
Author

Okay @hugodutka, just give me a few hours, and I’ll open a PR shortly.

@hugodutka
Copy link
Contributor

@Harsh9485 I read through the PR briefly, nice work. All of our agent modules have support for the task prompt and system prompt parameters - we'd need them for AMP too. I'll do a full review once we have them.

@Harsh9485
Copy link
Author

@hugodutka, honestly, I don’t fully understand the use of the system prompt, but I referenced the Goose module and added support for it. If I made any mistakes, please let me know.

@DevelopmentCats
Copy link
Contributor

@hugodutka, task prompt works! Check it. Screenshot 2025-08-09 161528

3 tests failed:
(fail) Sourcegraph AMP Module > happy-path [39490.49ms]
(fail) Sourcegraph AMP Module > sourcegraph-amp-api-key [19563.24ms]
(fail) Sourcegraph AMP Module > amp-not-installed [19606.24ms]

Also you need to run bun run fmt

@Harsh9485
Copy link
Author

@hugodutka @matifali @DevelopmentCats

I ran all the tests and they passed!

Screenshot 2025-08-12 163305

@matifali
Copy link
Member

@Harsh9485 you need to add a profile readme in registry/harsh9485/README.md
Please check https://github.com/coder/registry/blob/main/registry/anomaly/README.md as an example

@Harsh9485
Copy link
Author

@Harsh9485 you need to add a profile readme in registry/harsh9485/README.md Please check https://github.com/coder/registry/blob/main/registry/anomaly/README.md as an example

Done!

@Harsh9485
Copy link
Author

@matifali @hugodutka, let’s finish it today.

@Harsh9485
Copy link
Author

Thanks for the review, @DevelopmentCats . I’ve pushed the suggested changes.

@Harsh9485
Copy link
Author

@hugodutka @DevelopmentCats @matifali Any suggestions for changes?

@DevelopmentCats
Copy link
Contributor

I'm going to pull this locally and test one last time this morning.

@Harsh9485 can we put this under the coder-labs contributor instead of yours?

We hope to support co-authoring so it can show up as both, but I want to associate the agent modules with the Coder name as we will ship updates/patches to them and there is no expectation for you to always do that :)

@matifali
Copy link
Member

@Harsh9485, can you move the module to the coder-labs namespace? We are aggregating all agentic modules under there. This was overlooked in the initial review sessions.

@Harsh9485
Copy link
Author

Power's out at my place, I'll do this when it's back

@Harsh9485
Copy link
Author

@Harsh9485, can you move the module to the coder-labs namespace? We are aggregating all agentic modules under there. This was overlooked in the initial review sessions.

When I move module to coder-labs, should I just keep my username folder where it is?

@Harsh9485
Copy link
Author

@matifali @DevelopmentCats, I moved the module into coder-labs. Can you check?

@DevelopmentCats
Copy link
Contributor

@matifali @DevelopmentCats, I moved the module into coder-labs. Can you check?

You just need to remove the namespace stuff since it is moved to coder-labs now.

@Harsh9485
Copy link
Author

@DevelopmentCats I have removed all old references.

@DevelopmentCats
Copy link
Contributor

@DevelopmentCats I have removed all old references.

I still see the files in the PR im not sure they actually got removed

@Harsh9485
Copy link
Author

I still see the files in the PR im not sure they actually got removed

You mean the harsh9485 directory? Do you want me to remove this directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sourcegraph Amp Module
4 participants