Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/happy-app/sources/-session/SessionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function SessionViewLoaded({ sessionId, session }: { sessionId: string, session:
dotColor: sessionStatus.statusDotColor,
isPulsing: sessionStatus.isPulsing
}}
blockSend={isDisconnected}
blockSend={false}
onSend={() => {
if (message.trim()) {
setMessage('');
Expand Down
6 changes: 6 additions & 0 deletions packages/happy-cli/src/api/apiSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ export class ApiSessionClient extends EventEmitter {
if (data.body.metadata && data.body.metadata.version > this.metadataVersion) {
this.metadata = decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(data.body.metadata.value));
this.metadataVersion = data.body.metadata.version;
// Check if session was archived from web/mobile
const meta = this.metadata as any;
if (meta?.lifecycleState === 'archiveRequested' || meta?.lifecycleState === 'archived') {
logger.debug(`[SOCKET] Session archived (${meta.lifecycleState}), exiting...`);
this.emit('archived');
}
}
if (data.body.agentState && data.body.agentState.version > this.agentStateVersion) {
this.agentState = data.body.agentState.value ? decrypt(this.encryptionKey, this.encryptionVariant, decodeBase64(data.body.agentState.value)) : null;
Expand Down
6 changes: 6 additions & 0 deletions packages/happy-cli/src/claude/runClaude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@ export async function runClaude(credentials: Credentials, options: StartOptions
let currentAppendSystemPrompt: string | undefined = undefined; // Track current append system prompt
let currentAllowedTools: string[] | undefined = undefined; // Track current allowed tools
let currentDisallowedTools: string[] | undefined = undefined; // Track current disallowed tools
// Exit when session is archived from web/mobile
session.on('archived', () => {
logger.debug('[loop] Session archived from web/mobile, cleaning up...');
cleanup();
});

session.onUserMessage((message) => {

// Resolve permission mode from meta - pass through as-is, mapping happens at SDK boundary
Expand Down