Function
buildResumeInputFromSuggestion
(suggestion: SuggestionItem)
Source from the content-addressed store, hash-verified
| 73 | return newIndex >= 0 ? newIndex : 0; |
| 74 | } |
| 75 | function buildResumeInputFromSuggestion(suggestion: SuggestionItem): string { |
| 76 | const metadata = suggestion.metadata as { |
| 77 | sessionId: string; |
| 78 | } | undefined; |
| 79 | return metadata?.sessionId ? `/resume ${metadata.sessionId}` : `/resume ${suggestion.displayText}`; |
| 80 | } |
| 81 | type Props = { |
| 82 | onInputChange: (value: string) => void; |
| 83 | onSubmit: (value: string, isSubmittingSlashCommand?: boolean) => void; |
Tested by
no test coverage detected