Skip to content

Commit df33633

Browse files
committed
fix: use 2-arg respondTo for JavaClaw 1.0 API compatibility
1 parent 0e60e18 commit df33633

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/java/ai/javaclaw/channels/atmosphere/AtmosphereChatChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public String getName() {
7171
public String chat(String message) {
7272
channelRegistry.publishMessageReceivedEvent(
7373
new ChannelMessageReceivedEvent(getName(), message));
74-
return agent.respondTo(message);
74+
return agent.respondTo(message, "atmosphere");
7575
}
7676

7777
/**

src/main/java/ai/javaclaw/channels/atmosphere/JavaClawAgentBridge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void ask(TaskContext task,
8989
@AgentSkillParam(name = "message", description = "The question to ask") String message) {
9090
task.updateStatus(TaskState.WORKING, "Processing: " + message);
9191
try {
92-
var response = agent.respondTo(message);
92+
var response = agent.respondTo(message, "atmosphere");
9393
task.addArtifact(Artifact.text(response));
9494
task.complete("Response generated");
9595
} catch (Exception e) {

src/main/java/ai/javaclaw/channels/atmosphere/JavaClawToolBridge.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void ask(TaskContext task,
7070
@AgentSkillParam(name = "message", description = "The question or request") String message) {
7171
task.updateStatus(TaskState.WORKING, "Processing: " + message);
7272
try {
73-
var response = agent.respondTo(message);
73+
var response = agent.respondTo(message, "atmosphere");
7474
task.addArtifact(Artifact.text(response));
7575
task.complete("Response generated");
7676
} catch (Exception e) {
@@ -93,7 +93,7 @@ public void search(TaskContext task,
9393
task.updateStatus(TaskState.WORKING, "Searching: " + query);
9494
try {
9595
var response = agent.respondTo("Search the web for: " + query
96-
+ ". Return a concise summary of the top results.");
96+
+ ". Return a concise summary of the top results.", "atmosphere");
9797
task.addArtifact(Artifact.text(response));
9898
task.complete("Search complete");
9999
} catch (Exception e) {
@@ -113,7 +113,7 @@ public void manageTask(TaskContext task,
113113
@AgentSkillParam(name = "action", description = "What to do: 'create', 'list', 'complete', or describe the task") String action) {
114114
task.updateStatus(TaskState.WORKING, "Managing task: " + action);
115115
try {
116-
var response = agent.respondTo(action);
116+
var response = agent.respondTo(action, "atmosphere");
117117
task.addArtifact(Artifact.text(response));
118118
task.complete("Task action complete");
119119
} catch (Exception e) {
@@ -133,7 +133,7 @@ public void fileOps(TaskContext task,
133133
@AgentSkillParam(name = "request", description = "What to do with files") String request) {
134134
task.updateStatus(TaskState.WORKING, "File operation: " + request);
135135
try {
136-
var response = agent.respondTo(request);
136+
var response = agent.respondTo(request, "atmosphere");
137137
task.addArtifact(Artifact.text(response));
138138
task.complete("File operation complete");
139139
} catch (Exception e) {

0 commit comments

Comments
 (0)