Repository navigation
docs: Add code assistant tutorial - #1386
Rajkumar7633 wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
339221f to
c64aa51
Compare
Rajkumar7633
left a comment
There was a problem hiding this comment.
No existing issue. This PR adds:
-
New code assistant tutorial feature
-
Critical code quality improvements (unsafe Optional.get() fixes)
Problem: -
Missing code assistant tutorial for developers
-
Unsafe Optional.get() calls that could cause NoSuchElementException crashes
-
Inconsistent error handling in LLM flow processing
Solution: -
Added new code-assistant tutorial with 4 tools (generate, review, explain, debug code)
-
Replaced unsafe .get() calls with orElseThrow() for better error handling
-
Added meaningful error messages for debugging
-
Removed duplicate condition checks
Testing Plan:
Unit Tests:
- All 24 modules pass successfully (BUILD SUCCESS)
- ./mvnw test completed in 2:23 min with no failures
Manual E2E Tests:
- Tested code assistant tutorial with GOOGLE_API_KEY
- Verified all 4 tools work correctly via web interface
- Tested existing tutorials still work after changes
|
Hi @Rajkumar7633, thank you for your contribution! We appreciate you taking the time to submit this pull request. To proceed with the review, could you please address the following,
|
46ef6dd to
da774e6
Compare
|
@Rajkumar7633, thank you for addressing the feedback and squashing your commits, Currently this PR is under review by our team, we will keep you posted if any additional information is required. thank you |
damianmomotgoogle
left a comment
There was a problem hiding this comment.
Please also keep PR as single commit and update both commit message and PR title to follow conventional commits.
As this looks to be example/tutorial you could use docs: Add code assistant tutorial
| .modelName() | ||
| .orElseThrow( | ||
| () -> | ||
| new IllegalStateException( |
There was a problem hiding this comment.
This looks like behavior change - if needed please contribute it in a separate PR - this one should be limited to code assistant tutorial itself
| .outputSchema() | ||
| .orElseThrow( | ||
| () -> | ||
| new IllegalStateException( |
There was a problem hiding this comment.
Same ask to keep core logic changes to a separate PR
| } | ||
|
|
||
| int finalConfirmationEventIndex = confirmationResult.get().eventIndex(); | ||
| ConfirmationResult result = |
There was a problem hiding this comment.
Same ask to move core logic changes to a separate PR
96fe2b4 to
9ec717b
Compare
Add a new code-assistant tutorial module with four tools for generating, reviewing, explaining, and debugging code, along with a README and unit tests.
9ec717b to
2f2cf0d
Compare
|
All feedback addressed: core changes moved to #1809, PR is now limited to the code assistant tutorial, squashed to a single conventional commit ( |
Description
This PR adds a new code assistant tutorial to the
tutorials/modules.New Features
code-assistanttutorial module with 4 tools (generate, review, explain, debug code)CodeAssistant.javawith comprehensive code assistance capabilitiespom.xmlto include the new moduleTesting
Unit Tests
Added
CodeAssistantTest.javawith 10 unit tests covering:generateCodefunctionality (2 tests)reviewCodefunctionality (2 tests)explainCodefunctionality (2 tests)debugCodefunctionality (2 tests)ROOT_AGENTvalidation (2 tests)All 10 unit tests pass successfully (
./mvnw test -pl tutorials/code-assistant -am).Manual E2E Tests
GOOGLE_API_KEY