<commit_before>define(["xaml!js/ui/AutoSuggestionBox", "xaml!sprd/data/SprdApiDataSource", "JSON", "rAppid"], function (AutoCompleteBox, SprdApiDataSource, JSON, rAppid) {

    return AutoCompleteBox.inherit("sprd.view.AutoSuggestionSearch", {

        inject: {
            api: SprdApiDataSource
        },

        _search: function(searchTerm, callback) {
            rAppid.ajax("/tag-service/sprd-tags/tags?locale=de_DE&prefix=" + searchTerm +"&simple=true", null, function(err, result) {
                var data = null;
                if (!err) {
                    try {
                        data = JSON.parse(result.responses.text);
                    } catch (e) {
                        err = e;
                    }
                }

                callback && callback(err, data);
            });
        }

    });

});<commit_msg>DEV-63420 - Implemented related tag functionality<commit_after>define(["xaml!js/ui/AutoSuggestionBox", "xaml!sprd/data/SprdApiDataSource", "JSON", "rAppid"], function (AutoCompleteBox, SprdApiDataSource, JSON, rAppid) {

    return AutoCompleteBox.inherit("sprd.view.AutoSuggestionSearch", {

        inject: {
            api: SprdApiDataSource
        },

        _search: function (searchTerm, callback) {
            var locale = this.$stage.$parameter.locale;
            if (locale) {
                rAppid.ajax("/tag-service/sprd-tags/tags?locale=" + locale + "&prefix=" + searchTerm + "&simple=true", null, function (err, result) {
                    var data = null;
                    if (!err) {
                        try {
                            data = JSON.parse(result.responses.text);
                        } catch (e) {
                            err = e;
                        }
                    }

                    callback && callback(err, data);
                });
            }
        }

    });

});
{'fraction_non_alphanumeric': 0.12578947368421053, 'fraction_numerical': 0.002631578947368421, 'mean_word_length': 1.494750656167979, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3931914', 'n_tokens_mistral': 539, 'n_tokens_neox': 501, 'n_words': 89}