Skip to content

Commit 55c02b5

Browse files
authored
Merge branch 'main' into yhcnk1-codex/fix-taskgist-word-separation-issue
2 parents 6cbdc5d + 10e9e54 commit 55c02b5

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ Taskgist requires a Google AI API key to interact with the Gemini LLM.
119119

120120
Once installed and configured, you can use the `taskgist` CLI. Ensure your virtual environment is activated if you're not using `just run` or `uv run`.
121121
122-
**Check the installed version:**
123-
```bash
124-
taskgist --version
125-
```
126-
127122
**Basic usage with a string input:**
128123
```bash
129124
taskgist "Create a new user authentication system with email verification and password reset capabilities"

src/taskgist/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.1"
1+
__version__ = "0.2.2"

src/taskgist/baml_src/keywords.baml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
class KeywordPhrase {
22
actionVerb string @description("The leading verb that describes the main action")
3-
phrase string[] @description("Complete keyword phrase with essential terms only")
3+
phrase string[] @description("Rest of the keyword phrase with essential terms only")
44
}
55

66
function ExtractKeywords(taskDescription: string) -> KeywordPhrase {
77
client FlashLite
88
prompt #"
99
Extract a concise keyword phrase from the given software engineering task description.
1010
Guidelines:
11-
- Return at most five keywords.
11+
- Return at most 5 keywords.
1212
- The first keyword must be a single-word action verb summarizing the task.
13-
- Each keyword must be a single word with no spaces.
13+
- Each keyword MUST be a single word with NO SPACES.
1414
- Omit articles (the, a, an), common prepositions (in, on, to, for), and pronouns (it, this, that, etc.).
1515
- Keep only essential terms representing the core task.
1616

src/taskgist/main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,18 @@ def create_gist(keyword_phrase_obj: KeywordPhrase) -> str:
135135
def main_cli():
136136
"""Command-line interface for taskgist."""
137137
parser = argparse.ArgumentParser(
138+
prog="taskgist",
138139
description="Generates a concise gist from a software engineering task description using BAML.",
139140
formatter_class=argparse.RawTextHelpFormatter,
140141
)
141142
parser.add_argument(
142-
"-v",
143143
"--version",
144144
action="version",
145145
version=f"%(prog)s {__version__}",
146146
)
147147
parser.add_argument(
148148
"task",
149+
nargs="?",
149150
type=str,
150151
help="The task description string, or a file path prefixed with '@:' (e.g., '@:path/to/task.txt').\n"
151152
'Example: taskgist "Create a new user authentication system"\n'
@@ -154,6 +155,13 @@ def main_cli():
154155

155156
args = parser.parse_args()
156157

158+
if args.version:
159+
print(f"{parser.prog} {__version__}")
160+
return
161+
162+
if args.task is None:
163+
parser.error("the following arguments are required: task")
164+
157165
try:
158166
task_description_content = get_task_description(args.task)
159167
except FileNotFoundError as e:

tests/test_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import subprocess
2-
import sys
32
import unittest
43

54
import taskgist
@@ -8,7 +7,7 @@
87
class TestVersionCLI(unittest.TestCase):
98
def test_cli_version(self):
109
result = subprocess.run(
11-
[sys.executable, "-m", "taskgist.main", "--version"],
10+
["taskgist", "--version"],
1211
capture_output=True,
1312
text=True,
1413
)

0 commit comments

Comments
 (0)