added option '-a' to match all tags when selecting chat history entries
This commit is contained in:
@@ -56,7 +56,8 @@ def process_and_display_chat(args: argparse.Namespace,
|
||||
|
||||
full_question = '\n\n'.join(question_parts)
|
||||
chat = create_chat(full_question, tags, extags, config,
|
||||
args.with_tags, args.with_file)
|
||||
args.match_all_tags, args.with_tags,
|
||||
args.with_file)
|
||||
display_chat(chat, dump, args.only_source_code)
|
||||
return chat, full_question, tags
|
||||
|
||||
@@ -104,6 +105,7 @@ def create_parser() -> argparse.ArgumentParser:
|
||||
parser.add_argument('-S', '--only-source-code', help='Print only source code', action='store_true')
|
||||
parser.add_argument('-w', '--with-tags', help="Print chat history with tags.", action='store_true')
|
||||
parser.add_argument('-W', '--with-file', help="Print chat history with filename.", action='store_true')
|
||||
parser.add_argument('-a', '--match-all-tags', help="All given tags must match when selecting chat history entries.", action='store_true')
|
||||
tags_arg = parser.add_argument('-t', '--tags', nargs='*', help='List of tag names', metavar='TAGS')
|
||||
tags_arg.completer = tags_completer # type: ignore
|
||||
extags_arg = parser.add_argument('-e', '--extags', nargs='*', help='List of tag names to exclude', metavar='EXTAGS')
|
||||
|
||||
Reference in New Issue
Block a user