Skip to content

Commit 31f5412

Browse files
committed
fix: moved sound media
1 parent ce6f50a commit 31f5412

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gptme/tools/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def _from_codeblock(cls, codeblock: Codeblock) -> "ToolUse | None":
345345
# NOTE: special case
346346
args = (
347347
codeblock.lang.split(" ")[1:]
348-
if tool.name not in ["save", "append", "patch", "morph"]
348+
if tool.name not in ["save", "append", "patch"]
349349
else [codeblock.lang]
350350
)
351351
return ToolUse(tool.name, args, codeblock.content, start=codeblock.start)

gptme/util/sound.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
playback_thread: threading.Thread | None = None
3636
current_volume = 0.7
3737

38+
media_path = Path(__file__).parent.parent.parent / "media"
39+
3840

3941
def is_audio_available() -> bool:
4042
"""Check if audio playback is available."""
@@ -345,7 +347,7 @@ def play_ding():
345347
"""Play the UI ding sound."""
346348
log.info("Playing ding sound")
347349
# Get the bell sound file from the package
348-
bell_path = Path(__file__).parent.parent / "media" / "bell.wav"
350+
bell_path = media_path / "bell.wav"
349351

350352
if bell_path.exists():
351353
play_sound_file(bell_path, block=False)
@@ -373,7 +375,7 @@ def play_tool_sound(sound_type: str):
373375
return
374376

375377
# Get the sound file from the package
376-
sound_path = Path(__file__).parent.parent / "media" / f"{sound_type}.wav"
378+
sound_path = media_path / f"{sound_type}.wav"
377379

378380
if sound_path.exists():
379381
log.debug(f"Playing tool sound: {sound_type}")

0 commit comments

Comments
 (0)