JetBrains-Research / JetBrains-Research/TestSpark

Add language-agnostic parsing of the backtick block with code snippet for `HuggingFaceRequestManage`

Open
#290 1 comment 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Kotlin
Stars
88
Forks
24
PR merge metrics
No merged PRs in 30d

Description

# Description
The [implementation](https://github.com/JetBrains-Research/TestSpark/blob/a5c0e7a6ce0daffb01fbf522109cc78706aad613/src/main/kotlin/org/jetbrains/research/testspark/tools/llm/generation/hf/HuggingFaceRequestManager.kt#L106C17-L106C40) of the method `HuggingFaceRequestManager.extractLLMGeneratedCode` has a hard-coded Java-specific parsing.

It should be re-implemented to either support Kotlin as well or, even better, be completely language-agnostic or language-parameterizable.

**Screenshots:**
Screenshot 2024-07-05 at 13 26 02

Contributor guide

Open the contributing guide

Research direction

Start with HuggingFaceRequestManager.kt at HuggingFaceRequestManager.extractLLMGeneratedCode, linked in the issue, and inspect the current Java-specific backtick-block parsing. Define whether the implementation should accept Kotlin too or expose language-independent or language-parameterized behavior; done means generated code snippets are parsed without relying only on Java syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.