File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ def _from_codeblock(cls, codeblock: Codeblock) -> "ToolUse | None":
345
345
# NOTE: special case
346
346
args = (
347
347
codeblock .lang .split (" " )[1 :]
348
- if tool .name not in ["save" , "append" , "patch" , "morph" ]
348
+ if tool .name not in ["save" , "append" , "patch" ]
349
349
else [codeblock .lang ]
350
350
)
351
351
return ToolUse (tool .name , args , codeblock .content , start = codeblock .start )
Original file line number Diff line number Diff line change 35
35
playback_thread : threading .Thread | None = None
36
36
current_volume = 0.7
37
37
38
+ media_path = Path (__file__ ).parent .parent .parent / "media"
39
+
38
40
39
41
def is_audio_available () -> bool :
40
42
"""Check if audio playback is available."""
@@ -345,7 +347,7 @@ def play_ding():
345
347
"""Play the UI ding sound."""
346
348
log .info ("Playing ding sound" )
347
349
# 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"
349
351
350
352
if bell_path .exists ():
351
353
play_sound_file (bell_path , block = False )
@@ -373,7 +375,7 @@ def play_tool_sound(sound_type: str):
373
375
return
374
376
375
377
# 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"
377
379
378
380
if sound_path .exists ():
379
381
log .debug (f"Playing tool sound: { sound_type } " )
You can’t perform that action at this time.
0 commit comments