fix(agent): Hotfix 1.3.2: disable syntax-based replace range calculation by default. (#1345)

* fix(agent): Hotfix 1.3.2: disable syntax-based replace range calculation by default.

* test(agent): update test description.
This commit is contained in:
Zhiming Ma 2024-02-01 13:39:31 +08:00 committed by GitHub
parent 81f365abbd
commit a818905c7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 91 additions and 3 deletions

View File

@ -1,3 +1,9 @@
## 1.3.2
### Features
- Disabled experimental feature of syntax-based replace range calculation by default.
## 1.3.1
### Features

View File

@ -1,6 +1,6 @@
{
"name": "tabby-agent",
"version": "1.3.1",
"version": "1.3.2",
"description": "Generic client agent for Tabby AI coding assistant IDE extensions.",
"homepage": "https://tabby.tabbyml.com/",
"repository": "https://github.com/TabbyML/tabby",

View File

@ -84,7 +84,7 @@ export const defaultAgentConfig: AgentConfig = {
},
},
calculateReplaceRange: {
experimentalSyntax: true,
experimentalSyntax: false,
},
},
logs: {

View File

@ -1,4 +1,4 @@
description = 'Replace range experimental: syntax javascript: bad case 01'
description = 'Replace range experimental: syntax javascript: case 01'
[config.limitScope]
experimentalSyntax = true

View File

@ -0,0 +1,30 @@
description = 'Replace range experimental: syntax rust: bad case 01'
[config.limitScope]
experimentalSyntax = true
[config.calculateReplaceRange]
experimentalSyntax = true
[context]
filepath = 'myTest.rs'
language = 'rust'
# indentation = ' ' # not specified
text = '''
pub fun myTest(&self, text: String) {
let mut body = HashMap::new();
body.insert("├text".to_string(), text);")
let mut headers = HashMap::new();
headers.insert("Content-Type".to_string(), "application/json".to_string());
}
'''
[expected]
text = '''
pub fun myTest(&self, text: String) {
let mut body = HashMap::new();
body.insert("├text".to_string(), text);")
let mut headers = HashMap::new();
headers.insert("Content-Type".to_string(), "application/json".to_string());
}
'''
notEqual = true

View File

@ -0,0 +1,29 @@
description = 'Replace range experimental: syntax rust: case 01 (ref)'
[config.limitScope]
experimentalSyntax = true
[config.calculateReplaceRange]
experimentalSyntax = false
[context]
filepath = 'myTest.rs'
language = 'rust'
# indentation = ' ' # not specified
text = '''
pub fun myTest(&self, text: String) {
let mut body = HashMap::new();
body.insert("├text".to_string(), text);")
let mut headers = HashMap::new();
headers.insert("Content-Type".to_string(), "application/json".to_string());
}
'''
[expected]
text = '''
pub fun myTest(&self, text: String) {
let mut body = HashMap::new();
body.insert("├text".to_string(), text);")
let mut headers = HashMap::new();
headers.insert("Content-Type".to_string(), "application/json".to_string());
}
'''

View File

@ -0,0 +1,23 @@
description = 'Replace range experimental: syntax typescript: case 01'
[config.limitScope]
experimentalSyntax = true
[config.calculateReplaceRange]
experimentalSyntax = true
[context]
filepath = 'print.ts'
language = 'typescript'
# indentation = ' ' # not specified
text = '''
function print(obj: any) {
console.log("Obj: ├", obj);")
}
'''
[expected]
text = '''
function print(obj: any) {
console.log("Obj: ├", obj);")
}
'''