Skip to content

Commit 5522df7

Browse files
authored
feat: Add some additional methods to TaskUpdater (#339)
# Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [x] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [x] Ensure the tests pass - [x] Appropriate READMEs were updated (if necessary)
1 parent 47c906f commit 5522df7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ private void updateStatus(TaskState state, Message message, boolean isFinal) {
5858
}
5959
}
6060

61+
public String getContextId() {
62+
return this.contextId;
63+
}
64+
65+
public void addArtifact(List<Part<?>> parts) {
66+
addArtifact(parts, null, null, null);
67+
}
68+
6169
public void addArtifact(List<Part<?>> parts, String artifactId, String name, Map<String, Object> metadata) {
6270
addArtifact(parts, artifactId, name, metadata, null, null);
6371
}

0 commit comments

Comments
 (0)