<commit_before>
<template>
  <div class="c-method">
    <v-row class="c-method--section c-method--params" v-if="filteredParams.length">
      <v-col>
        Parameters
      </v-col>
      <v-col class="py-0">
        <v-row >
          <v-col
            v-for="param in filteredParams"
            :key="param.name"
            cols=12 sm=6 md=4 lg=3
          >
            <c-input 
              v-model="caller.args[param.name]" 
              :for="param" 
              hide-details
            />
          </v-col>
        </v-row>
      </v-col>
    </v-row>
<!-- 
    <v-row class="c-method--section c-method--execute">
      <v-col>
        Execute
      </v-col>
      <v-col>
        <v-btn  
          class="mr-3"
          color="primary" 
          @click="caller.invokeWithArgs()"
          :loading="caller.isLoading">
          Execute
        </v-btn>
        
      </v-col>
    </v-row> -->


    <v-row class="c-method--section c-method--results">
      <v-col>
        <v-btn  
          color="primary" 
          @click="invoke"
          :loading="caller.isLoading"
          sm
        >
          Execute
        </v-btn>
      </v-col>
      <v-col>
        <c-loader-status 
          :progress-placeholder="false"
          :loaders="{'no-initial-content no-error-content no-loading-content': [caller]}"
          style="min-height: 55px"
        >
          <h3>Result:</h3>
          <c-display 
            v-if="caller.result != null"
            element="pre"
            class="c-method--result-value"
            v-model="caller.result" 
            :for="methodMeta.return"
            :options="resultDisplayOptions"
          />
          <span
            v-else-if="caller.wasSuccessful != null && caller.result == null"
            class="c-method--result-null"
          >
            <pre>{{"" + caller.result}}</pre>
          </span>
        </c-loader-status>
      </v-col>
    </v-row>
<commit_msg>Better ux for void-returning methods - don't render 'null' on success.<commit_after>
<template>
  <div class="c-method">
    <v-row class="c-method--section c-method--params" v-if="filteredParams.length">
      <v-col>
        Parameters
      </v-col>
      <v-col class="py-0">
        <v-row >
          <v-col
            v-for="param in filteredParams"
            :key="param.name"
            cols=12 sm=6 md=4 lg=3
          >
            <c-input 
              v-model="caller.args[param.name]" 
              :for="param" 
              hide-details
            />
          </v-col>
        </v-row>
      </v-col>
    </v-row>
<!-- 
    <v-row class="c-method--section c-method--execute">
      <v-col>
        Execute
      </v-col>
      <v-col>
        <v-btn  
          class="mr-3"
          color="primary" 
          @click="caller.invokeWithArgs()"
          :loading="caller.isLoading">
          Execute
        </v-btn>
        
      </v-col>
    </v-row> -->


    <v-row class="c-method--section c-method--results">
      <v-col>
        <v-btn  
          color="primary" 
          @click="invoke"
          :loading="caller.isLoading"
          sm
        >
          Execute
        </v-btn>
      </v-col>
      <v-col>
        <c-loader-status 
          :progress-placeholder="false"
          :loaders="{'no-initial-content no-error-content no-loading-content': [caller]}"
          style="min-height: 55px"
        >
          <h3>Result:</h3>
          <c-display 
            v-if="caller.result != null"
            element="pre"
            class="c-method--result-value"
            v-model="caller.result" 
            :for="methodMeta.return"
            :options="resultDisplayOptions"
          />
          <span
            v-else-if="methodMeta.return.type == 'void'.wasSuccessful != null"
            class="c-method--result-void"
          >
            <v-alert type="success" dense>Success</v-alert>
          </span>
          <span
            v-else-if="caller.wasSuccessful != null && caller.result == null"
            class="c-method--result-null"
          >
            <pre>{{"" + caller.result}}</pre>
          </span>
        </c-loader-status>
      </v-col>
    </v-row>

{'fraction_non_alphanumeric': 0.16316793893129772, 'fraction_numerical': 0.005248091603053435, 'mean_word_length': 1.287506819421713, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, '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': '137952', 'n_tokens_mistral': 1374, 'n_tokens_neox': 1325, 'n_words': 196}