spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / hooks / pane-state / after-new-session / after-new-session.ts
14 lines · 404 BRaw
1import type { PaneModel } from '../pane-model'
2import { NEW_SESSION_FIELDS } from './new-session-fields'
3
4/**
5 * The model after `/clear` or `/resume`: the fetch kept, every pick and
6 * the transcript's turns dropped.
7 *
8 * @param model the model before the switch
9 * @returns the reset model
10 */
11export const afterNewSession = (model: PaneModel): PaneModel => ({
12 ...model,
13 ...NEW_SESSION_FIELDS,
14})