<commit_before># TODO: is this correct here? only way I found to access init function here
root = global ? window

console.log "updating <%= @bit.id %> : <%= @bit.content %>"

$("#bit_<%= @bit.id %>").remove()
$("#data .cluster").append "<%= j ( render :template => 'bits/show', :locals => { :bit => @bit }  ) %>"

root.initBitBehaviors() # TODO: after reload, need to rebind all JS behaviors<commit_msg>notification on bit:save<commit_after># TODO: is this correct here? only way I found to access init function here
root = global ? window

console.log 

$("#bit_<%= @bit.id %>").remove()
$("#data .cluster").append "<%= j ( render :template => 'bits/show', :locals => { :bit => @bit }  ) %>"

m = showNotification "updating bit <%= @bit.id %> : <%= @bit.content %>", "warning"

root.initBitBehaviors() # TODO: after reload, need to rebind all JS behaviors
{'fraction_non_alphanumeric': 0.19486581096849476, 'fraction_numerical': 0.0, 'mean_word_length': 4.5, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '7296444', 'n_tokens_mistral': 286, 'n_tokens_neox': 270, 'n_words': 93}