MCPcopy Create free account
hub / github.com/HKUDS/Paper2Slides / getOutputDisplayName

Function getOutputDisplayName

frontend/src/components/ChatWindow.jsx:136–167  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

134
135 // Generate display name for generated output
136 const getOutputDisplayName = (output) => {
137 // Format: Slides/Poster - FileName - style - content - length/density
138 const parts = []
139
140 // Output type
141 parts.push(output.outputType === 'slides' || output.outputType === 'ppt' ? 'Slides' : 'Poster')
142
143 // Source file name (without extension)
144 if (output.sourceFiles && output.sourceFiles.length > 0) {
145 const firstFileName = output.sourceFiles[0].replace(/\.[^/.]+$/, '')
146 parts.push(firstFileName)
147 }
148
149 // Style
150 if (output.style) {
151 parts.push(output.style)
152 }
153
154 // Content
155 if (output.content) {
156 parts.push(output.content)
157 }
158
159 // Length or Density
160 if (output.outputType === 'slides' && output.length) {
161 parts.push(output.length)
162 } else if (output.outputType === 'poster' && output.density) {
163 parts.push(output.density)
164 }
165
166 return parts.join(' - ')
167 }
168
169 // Update current conversation
170 const updateConversation = useCallback((convId, updates) => {

Callers 1

ChatWindowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected