<commit_before>module PT
  module Action
    def show_story(story)
      title story.name.green
      estimation = [-1, nil].include?(story.estimate) ? "Unestimated" : "#{story.estimate} points"
      requester = story.requested_by ? story.requested_by.initials : @local_config[:user_name]
      message "#{story.current_state.capitalize} #{story.story_type} | #{estimation} | Req: #{requester} |
      Owners: #{story.owners.map(&:initials).join(',')} | Id: #{story.id}"

      if (story.labels)
        message "Labels: " + story.labels.map(&:name).join(', ')
      end
      message story.description unless story.description.nil? || story.description.empty?
      message "View on pivotal: #{story.url}"

      if story.tasks
        title('tasks'.yellow)
        story.tasks.each{ |t| compact_message "- #{t.complete ? "[done]" : ""} #{t.description}" }
      end


      story.comments.each do |n|
        title('========================================='.red)
        text = ">> #{n.person.initials}: #{n.text}"
        text << "[#{n.file_attachment_ids.size}F]" if n.file_attachment_ids
        message text
      end
      save_recent_task( story.id )
    end

    def tasks_story(story)
      story_task = get_open_story_task_from_params(story)
      if story_task.position == -1
        description = ask('Title for new task')
        story.create_task(:description => description)
        congrats("New todo task added to \"#{story.name}\"")
      else
        edit_story_task story_task
      end
    end

    def open_story story
      `open #{story.url}`
    end

    def assign_story story
      if (owner = find_owner @params[1])
        @client.assign_task(story, owner)
      else<commit_msg>customize show story<commit_after>module PT
  module Action
    def show_story(story)
      title('========================================='.red)
      title story.name.red
      title('========================================='.red)
      estimation = [-1, nil].include?(story.estimate) ? "Unestimated" : "#{story.estimate} points"
      requester = story.requested_by ? story.requested_by.initials : @local_config[:user_name]
      message "#{story.current_state.capitalize} #{story.story_type} | #{estimation} | Req: #{requester} | Owners: #{story.owners.map(&:initials).join(',')} | ID: #{story.id}"

      if story.labels.present?
        message "Labels: " + story.labels.map(&:name).join(', ')
      end
      message story.description.green unless story.description.nil? || story.description.empty?
      message "View on pivotal: #{story.url}"

      if story.tasks.present?
        title('tasks'.yellow)
        story.tasks.each{ |t| compact_message "- #{t.complete ? "[done]" : ""} #{t.description}" }
      end


      story.comments.each do |n|
        title('......................................'.blue)
        text = ">> #{n.person.initials}: #{n.text}"
        text << "[#{n.file_attachment_ids.size}F]" if n.file_attachment_ids
        message text
      end
      save_recent_task( story.id )
    end

    def tasks_story(story)
      story_task = get_open_story_task_from_params(story)
      if story_task.position == -1
        description = ask('Title for new task')
        story.create_task(:description => description)
        congrats("New todo task added to \"#{story.name}\"")
      else
        edit_story_task story_task
      end
    end

    def open_story story
      `open #{story.url}`
    end

    def assign_story story
      if (owner = find_owner @params[1])
        @client.assign_task(story, owner)
      else
{'fraction_non_alphanumeric': 0.1801852371596969, 'fraction_numerical': 0.0016839741790625876, 'mean_word_length': 2.7436974789915967, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7082508', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1067, 'n_words': 227}