MCPcopy
hub / github.com/claude-code-best/claude-code / getRestoreOptions

Function getRestoreOptions

src/components/MessageSelector.tsx:133–167  ·  view source on GitHub ↗
(canRestoreCode: boolean)

Source from the content-addressed store, hash-verified

131
132 // Generate options with summarize as input type for inline context
133 function getRestoreOptions(canRestoreCode: boolean): OptionWithDescription<RestoreOption>[] {
134 const baseOptions: OptionWithDescription<RestoreOption>[] = canRestoreCode
135 ? [
136 { value: 'both', label: 'Restore code and conversation' },
137 { value: 'conversation', label: 'Restore conversation' },
138 { value: 'code', label: 'Restore code' },
139 ]
140 : [{ value: 'conversation', label: 'Restore conversation' }];
141
142 const summarizeInputProps = {
143 type: 'input' as const,
144 placeholder: 'add context (optional)',
145 initialValue: '',
146 allowEmptySubmitToCancel: true,
147 showLabelWithValue: true,
148 labelValueSeparator: ': ',
149 };
150 baseOptions.push({
151 value: 'summarize',
152 label: 'Summarize from here',
153 ...summarizeInputProps,
154 onChange: setSummarizeFromFeedback,
155 });
156 if (process.env.USER_TYPE === 'ant') {
157 baseOptions.push({
158 value: 'summarize_up_to',
159 label: 'Summarize up to here',
160 ...summarizeInputProps,
161 onChange: setSummarizeUpToFeedback,
162 });
163 }
164
165 baseOptions.push({ value: 'nevermind', label: 'Never mind' });
166 return baseOptions;
167 }
168
169 // Log when selector is opened
170 useEffect(() => {

Callers 1

MessageSelectorFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected