File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Fixed theme primary color not being applied
6
6
- ` Slash Command Menu ` : Fixed trigger & text insertion
7
+ - ` Export Thread ` : Fixed followup links ` (pplx://action/followup) ` not being removed
7
8
8
9
## Changes
9
10
10
- - Removed ` Raw Text Paste ` plugin as Perplexity no longer automatically converts pasted text to a file
11
+ - Removed ` Raw Text Paste ` plugin as Perplexity no longer automatically converts pasted text to a file
Original file line number Diff line number Diff line change @@ -140,7 +140,11 @@ async function copyMessageWithoutCitations({
140
140
messageBlockIndex : number ;
141
141
fetchFn : FetchFn ;
142
142
} ) {
143
- return copyContent ( { messageBlockIndex, fetchFn, withCitations : false } ) ;
143
+ copyContent ( {
144
+ messageBlockIndex,
145
+ fetchFn,
146
+ withCitations : false ,
147
+ } ) ;
144
148
}
145
149
146
150
async function copyThreadWithCitations ( { fetchFn } : { fetchFn : FetchFn } ) {
Original file line number Diff line number Diff line change @@ -155,21 +155,31 @@ export class ThreadExport {
155
155
includeCitations : boolean ;
156
156
messageIndex ?: number ;
157
157
} ) {
158
+ const removeFollowupLinks = ( text : string ) : string => {
159
+ return text . replace ( / \[ ( .* ?) \] \( p p l x : \/ \/ a c t i o n \/ f o l l o w u p \) / g, "$1" ) ;
160
+ } ;
161
+
162
+ // Export a single message if messageIndex is provided
158
163
if ( messageIndex != null && threadJSON [ messageIndex ] != null ) {
159
- return ThreadExport . exportMessage ( {
164
+ const exportedMessage = ThreadExport . exportMessage ( {
160
165
message : threadJSON [ messageIndex ] ,
161
166
includeCitations,
162
167
includeQuery : false ,
163
168
} ) ;
169
+
170
+ return removeFollowupLinks ( exportedMessage ) ;
164
171
}
165
172
166
- return threadJSON
173
+ // Export the entire thread
174
+ const exportedThread = threadJSON
167
175
. map ( ( message ) =>
168
176
ThreadExport . exportMessage ( {
169
177
message,
170
178
includeCitations,
171
179
} ) ,
172
180
)
173
181
. join ( " \n--- \n\n\n" ) ;
182
+
183
+ return removeFollowupLinks ( exportedThread ) ;
174
184
}
175
185
}
You can’t perform that action at this time.
0 commit comments