<commit_before>package layout

import "github.com/elves/elvish/styled"

// ModePrompt returns a styled text that is suitable as the prompt in the codearea
// of a combobox.
func ModePrompt(content string, space bool) func() styled.Text {
	p := styled.MakeText(content, "bold", "lightgray", "bg-magenta")
	if space {
		p = p.ConcatText(styled.Plain(" "))
	}
	return func() styled.Text { return p }<commit_msg>cli/layout: Make doc comment of ModeLine more accurate.<commit_after>package layout

import "github.com/elves/elvish/styled"

// ModePrompt returns a callback suitable as the prompt in the codearea of a
// combobox.
func ModePrompt(content string, space bool) func() styled.Text {
	p := styled.MakeText(content, "bold", "lightgray", "bg-magenta")
	if space {
		p = p.ConcatText(styled.Plain(" "))
	}
	return func() styled.Text { return p }
{'fraction_non_alphanumeric': 0.12632821723730814, 'fraction_numerical': 0.0, 'mean_word_length': 4.470967741935484, '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': '199020', 'n_tokens_mistral': 283, 'n_tokens_neox': 278, 'n_words': 88}