<commit_before>class CommentView extends KDView

  constructor:(options, data)->

    super

    @setClass "comment-container"
    @createSubViews data
    @resetDecoration()
    @attachListeners()

    {fixedHeight} = @getOptions()

    fixedHeight or= no

    @setFixedHeight fixedHeight  if fixedHeight

  render:->
    @resetDecoration()

  setFixedHeight: (maxHeight)->
    @setClass "fixed-height"
    @commentList.$().css {maxHeight}

  createSubViews: (data) ->

    @commentList = new KDListView
      type          : "comments"
      itemClass     : CommentListItemView
      delegate      : this
    , data

    @commentController        = new CommentListViewController view: @commentList
    @addSubView showMore      = new CommentViewHeader delegate: @commentList, data
    @addSubView @commentController.getView()
    @addSubView @commentForm  = new NewCommentForm delegate: @commentController

    @commentForm.on "Submit", @commentController.bound "reply"

    @commentList.on 'ReplyLinkClicked', (username) =>
      input = @commentForm.commentInput
      value = input.getValue()
      value = if value.indexOf("@#{username}") >= 0 then value else if value.length is 0 then "@#{username} " else "#{value} @#{username} "

      input.setFocus()
      input.setValue value<commit_msg>activity: fix comment form reference in "ReplyLinkClicked" event handler function<commit_after>class CommentView extends KDView

  constructor:(options, data)->

    super

    @setClass "comment-container"
    @createSubViews data
    @resetDecoration()
    @attachListeners()

    {fixedHeight} = @getOptions()

    fixedHeight or= no

    @setFixedHeight fixedHeight  if fixedHeight

  render:->
    @resetDecoration()

  setFixedHeight: (maxHeight)->
    @setClass "fixed-height"
    @commentList.$().css {maxHeight}

  createSubViews: (data) ->

    @commentList = new KDListView
      type          : "comments"
      itemClass     : CommentListItemView
      delegate      : this
    , data

    @commentController        = new CommentListViewController view: @commentList
    @addSubView showMore      = new CommentViewHeader delegate: @commentList, data
    @addSubView @commentController.getView()
    @addSubView @commentForm  = new NewCommentForm delegate: @commentController

    @commentForm.on "Submit", @commentController.bound "reply"

    @commentList.on 'ReplyLinkClicked', (username) =>
      {input} = @commentForm
      value = input.getValue()
      value = if value.indexOf("@#{username}") >= 0 then value else if value.length is 0 then "@#{username} " else "#{value} @#{username} "

      input.setFocus()
      input.setValue value
{'fraction_non_alphanumeric': 0.10688746706812194, 'fraction_numerical': 0.0015054572826496049, 'mean_word_length': 3.3079416531604537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '2492610', 'n_tokens_mistral': 761, 'n_tokens_neox': 730, 'n_words': 192}