@@ -43,26 +43,30 @@ const initialState: LiveFeedbackChatState = {
4343const sampleSuggestions = (
4444 isIncludingSuggestionFixes : boolean ,
4545) : Suggestion [ ] => {
46- const suggestionIndexes = Object . keys ( suggestionMapping ) ;
47- const suggestionFixIndexes = Object . keys ( suggestionFixesMapping ) ;
48-
49- const chosenSuggestionIndexes = isIncludingSuggestionFixes
50- ? shuffle ( suggestionIndexes )
51- . slice ( 0 , 2 )
52- . concat ( shuffle ( suggestionFixIndexes ) . slice ( 0 , 1 ) )
53- : shuffle ( suggestionIndexes ) . slice ( 0 , 3 ) ;
54-
55- return chosenSuggestionIndexes . map ( ( index ) => {
56- const suggestionIndex = Number ( index ) ;
57- const suggestion =
58- suggestionMapping [ suggestionIndex ] ??
59- suggestionFixesMapping [ suggestionIndex ] ;
60- return {
61- id : suggestion . id ,
62- index : suggestionIndex ,
63- defaultMessage : suggestion . defaultMessage ,
64- } ;
65- } ) ;
46+ /**
47+ * TODO: this feature is currently disabled, decide later whether to re-add or fully remove.
48+ */
49+ return [ ] ;
50+ // const suggestionIndexes = Object.keys(suggestionMapping);
51+ // const suggestionFixIndexes = Object.keys(suggestionFixesMapping);
52+
53+ // const chosenSuggestionIndexes = isIncludingSuggestionFixes
54+ // ? shuffle(suggestionIndexes)
55+ // .slice(0, 2)
56+ // .concat(shuffle(suggestionFixIndexes).slice(0, 1))
57+ // : shuffle(suggestionIndexes).slice(0, 3);
58+
59+ // return chosenSuggestionIndexes.map((index) => {
60+ // const suggestionIndex = Number(index);
61+ // const suggestion =
62+ // suggestionMapping[suggestionIndex] ??
63+ // suggestionFixesMapping[suggestionIndex];
64+ // return {
65+ // id: suggestion.id,
66+ // index: suggestionIndex,
67+ // defaultMessage: suggestion.defaultMessage,
68+ // };
69+ // });
6670} ;
6771
6872const defaultValue = ( answerId : number ) : LiveFeedbackChatData => {
0 commit comments