Rename assistant message to agent message and fix item type field naming (#4610)

Naming cleanup
This commit is contained in:
pakrym-oai
2025-10-02 15:07:14 -07:00
committed by GitHub
parent 138be0fd73
commit c405d8c06c
9 changed files with 26 additions and 26 deletions

View File

@@ -16,8 +16,8 @@ const thread = codex.startThread();
const rl = createInterface({ input, output });
const handleItemCompleted = (item: ThreadItem): void => {
switch (item.item_type) {
case "assistant_message":
switch (item.type) {
case "agent_message":
console.log(`Assistant: ${item.text}`);
break;
case "reasoning":
@@ -38,7 +38,7 @@ const handleItemCompleted = (item: ThreadItem): void => {
};
const handleItemUpdated = (item: ThreadItem): void => {
switch (item.item_type) {
switch (item.type) {
case "todo_list": {
console.log(`Todo:`);
for (const todo of item.items) {