mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat: promote Agent Skills from experimental to stable
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
139e621410
commit
a4ffc6eb24
28 changed files with 196 additions and 341 deletions
|
|
@ -58,7 +58,7 @@ The following is a simple example showing how to use the ACP SDK to create a cli
|
|||
public void testSession() throws AgentInitializeException, SessionNewException, IOException {
|
||||
// Create an ACP client with a process transport
|
||||
AcpClient acpClient = new AcpClient(
|
||||
new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "--experimental-skills", "-y"})));
|
||||
new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"})));
|
||||
|
||||
try {
|
||||
// Send a prompt to the agent
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class SessionTest {
|
|||
private static final Logger logger = LoggerFactory.getLogger(SessionTest.class);
|
||||
@Test
|
||||
public void testSession() throws AgentInitializeException, SessionNewException, IOException {
|
||||
AcpClient acpClient = new AcpClient(new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "--experimental-skills", "-y"})));
|
||||
AcpClient acpClient = new AcpClient(new ProcessTransport(new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"})));
|
||||
try {
|
||||
acpClient.sendPrompt(Collections.singletonList(new TextContent("你是谁")), new AgentEventConsumer().setContentEventConsumer(new ContentEventSimpleConsumer(){
|
||||
@Override
|
||||
|
|
@ -86,7 +86,7 @@ class SessionTest {
|
|||
@Test
|
||||
void test() throws SessionNewException, AgentInitializeException, IOException {
|
||||
Transport transport = new ProcessTransport(
|
||||
new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "--experimental-skills", "-y"}));
|
||||
new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "-y"}));
|
||||
AcpClient acpClient = new AcpClient(transport, new InitializeRequestParams().setClientCapabilities(
|
||||
new ClientCapabilities()
|
||||
.setTerminal(true)
|
||||
|
|
@ -98,7 +98,7 @@ class SessionTest {
|
|||
@Test
|
||||
void testPermission() throws AgentInitializeException, SessionNewException, IOException {
|
||||
Transport transport = new ProcessTransport(
|
||||
new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp", "--experimental-skills"}));
|
||||
new ProcessTransportOptions().setCommandArgs(new String[] {"qwen", "--acp"}));
|
||||
AcpClient acpClient = new AcpClient(transport, new InitializeRequestParams().setClientCapabilities(
|
||||
new ClientCapabilities()
|
||||
.setTerminal(false)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ The `TransportOptions` class allows configuration of how the SDK communicates wi
|
|||
- `allowedTools`: List of tools that are pre-approved for use without additional confirmation
|
||||
- `authType`: Authentication type to use for the session
|
||||
- `includePartialMessages`: Enables receiving partial messages during streaming responses
|
||||
- `skillsEnable`: Enables or disables skills functionality for the session
|
||||
- `turnTimeout`: Timeout for a complete turn of conversation
|
||||
- `messageTimeout`: Timeout for individual messages within a turn
|
||||
- `resumeSessionId`: ID of a previous session to resume
|
||||
|
|
|
|||
|
|
@ -245,7 +245,6 @@ The `TransportOptions` class allows configuration of how the SDK communicates wi
|
|||
- `allowedTools`: List of tools that are pre-approved for use without additional confirmation
|
||||
- `authType`: Authentication type to use for the session
|
||||
- `includePartialMessages`: Enables receiving partial messages during streaming responses
|
||||
- `skillsEnable`: Enables or disables skills functionality for the session
|
||||
- `turnTimeout`: Timeout for a complete turn of conversation
|
||||
- `messageTimeout`: Timeout for individual messages within a turn
|
||||
- `resumeSessionId`: ID of a previous session to resume
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ public class TransportOptions implements Cloneable {
|
|||
* Whether to include partial messages in responses.
|
||||
*/
|
||||
private Boolean includePartialMessages;
|
||||
/**
|
||||
* Whether to enable skills.
|
||||
*/
|
||||
private Boolean skillsEnable;
|
||||
/**
|
||||
* Timeout for individual turns.
|
||||
*/
|
||||
|
|
@ -298,26 +294,6 @@ public class TransportOptions implements Cloneable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether skills are enabled.
|
||||
*
|
||||
* @return Whether skills are enabled
|
||||
*/
|
||||
public Boolean getSkillsEnable() {
|
||||
return skillsEnable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether skills are enabled.
|
||||
*
|
||||
* @param skillsEnable Whether skills are enabled
|
||||
* @return This instance for method chaining
|
||||
*/
|
||||
public TransportOptions setSkillsEnable(Boolean skillsEnable) {
|
||||
this.skillsEnable = skillsEnable;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the turn timeout.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -107,10 +107,6 @@ class TransportOptionsAdapter {
|
|||
args.add("--include-partial-messages");
|
||||
}
|
||||
|
||||
if (transportOptions.getSkillsEnable() != null && transportOptions.getSkillsEnable()) {
|
||||
args.add("--experimental-skills");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(transportOptions.getResumeSessionId())) {
|
||||
args.add("--resume");
|
||||
args.add(transportOptions.getResumeSessionId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue