chat: add timestamps and elapsed time (#325061)

* chat: add timestamps and elapsed time

* put behind setting!

* fix tests

* ah timestamp fixes and better animations!

* switch to use new protocol changes

* bump ahp version

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Justin Chen
2026-07-14 17:18:52 +00:00
committed by GitHub
co-authored by copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
parent d4bfecdaa8
commit de6ea36c9e
56 changed files with 1525 additions and 305 deletions
@@ -451,6 +451,7 @@ suite('ProtocolServerHandler', () => {
action: {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'hello', origin: { kind: MessageKind.User } },
},
}));
@@ -975,6 +976,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1037,6 +1039,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1085,6 +1088,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1127,6 +1131,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1176,6 +1181,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1234,6 +1240,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1286,6 +1293,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1339,6 +1347,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(chatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
// Tool call stamped for a clientId that never connected (e.g. a
@@ -1378,6 +1387,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1407,6 +1417,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
// First orphaned tool call (owner never connected) arms the grace timer.
@@ -1458,6 +1469,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1512,6 +1524,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {
@@ -1576,6 +1589,7 @@ suite('ProtocolServerHandler', () => {
stateManager.dispatchServerAction(defaultChatUri, {
type: ActionType.ChatTurnStarted,
turnId: 'turn-1',
startedAt: '2025-01-01T00:00:00.000Z',
message: { text: 'run it', origin: { kind: MessageKind.User } },
});
stateManager.dispatchServerAction(defaultChatUri, {