jan icon indicating copy to clipboard operation
jan copied to clipboard

feat: Copy Entire Thread Button

Open pbeens opened this issue 1 year ago • 2 comments

Problem Currently you can only individually copy (with the copy button) the User fields or the Assistant fields, but not the entire thread.

Success Criteria I would love to see a button that lets you copy the entire thread for pasting into another program.

Additional context This could be done in the Threads Setting menu or via a button at the top and/or the bottom of the thread.

pbeens avatar Jan 08 '24 17:01 pbeens

I know this isn't the perfect immediate solution, but you already have all the thread history in your own files:

Export-1704965101591

Adding this a future feature enhancemnt request :)

freelerobot avatar Jan 11 '24 09:01 freelerobot

Thanks. This Python script will extract what I need. Hopefully others will find this useful until Jan is updated its own solution.

import json

# Replace filename with the path to your JSONL file
file = r'C:\Users\Peter\jan\threads\jan_1704487430\messages.jsonl'

# Open the file and read it line by line
with open(file) as f:
    for line in f:
        # Load each line as a JSON object
        data = json.loads(line)

        # Extract the role and content fields from the JSON object
        role = data.get('role')
        content = data.get('content')[0].get('text').get('value')

        # Print the role and content fields
        print(f"Role: {role}\nContent: {content}\n")

pbeens avatar Jan 11 '24 11:01 pbeens

Thanks for your suggestion. We will continue to improve Jan threads experience. This request will be included in #1940 which belongs to epic: #1507

imtuyethan avatar Feb 06 '24 11:02 imtuyethan