kash-shell 0.3.12__py3-none-any.whl → 0.3.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. kash/actions/core/markdownify.py +5 -4
  2. kash/actions/core/readability.py +4 -4
  3. kash/actions/core/render_as_html.py +6 -4
  4. kash/commands/base/basic_file_commands.py +3 -0
  5. kash/commands/base/diff_commands.py +38 -3
  6. kash/commands/base/reformat_command.py +1 -1
  7. kash/commands/base/show_command.py +1 -1
  8. kash/commands/workspace/selection_commands.py +1 -1
  9. kash/commands/workspace/workspace_commands.py +62 -16
  10. kash/docs/load_source_code.py +1 -1
  11. kash/exec/action_exec.py +4 -5
  12. kash/exec/fetch_url_metadata.py +8 -5
  13. kash/exec/importing.py +4 -4
  14. kash/exec/llm_transforms.py +1 -1
  15. kash/exec/preconditions.py +7 -7
  16. kash/file_storage/file_store.py +73 -32
  17. kash/file_storage/item_file_format.py +1 -1
  18. kash/file_storage/store_filenames.py +2 -1
  19. kash/help/help_embeddings.py +2 -2
  20. kash/llm_utils/clean_headings.py +1 -1
  21. kash/{text_handling → llm_utils}/custom_sliding_transforms.py +0 -3
  22. kash/llm_utils/llm_completion.py +1 -1
  23. kash/local_server/__init__.py +1 -1
  24. kash/local_server/local_server_commands.py +2 -1
  25. kash/mcp/__init__.py +1 -1
  26. kash/mcp/mcp_server_commands.py +8 -2
  27. kash/media_base/media_cache.py +10 -3
  28. kash/model/actions_model.py +3 -0
  29. kash/model/items_model.py +71 -42
  30. kash/shell/ui/shell_results.py +2 -1
  31. kash/utils/common/format_utils.py +0 -8
  32. kash/utils/common/import_utils.py +46 -18
  33. kash/utils/file_utils/file_formats_model.py +46 -26
  34. kash/utils/file_utils/filename_parsing.py +41 -16
  35. kash/{text_handling → utils/text_handling}/doc_normalization.py +10 -8
  36. kash/utils/text_handling/escape_html_tags.py +156 -0
  37. kash/{text_handling → utils/text_handling}/markdown_utils.py +0 -3
  38. kash/utils/text_handling/markdownify_utils.py +87 -0
  39. kash/{text_handling → utils/text_handling}/unified_diffs.py +1 -44
  40. kash/web_content/file_cache_utils.py +42 -34
  41. kash/web_content/local_file_cache.py +29 -12
  42. kash/web_content/web_extract.py +1 -1
  43. kash/web_content/web_extract_readabilipy.py +4 -2
  44. kash/web_content/web_fetch.py +42 -7
  45. kash/web_content/web_page_model.py +2 -1
  46. kash/web_gen/simple_webpage.py +1 -1
  47. kash/web_gen/templates/base_styles.css.jinja +134 -16
  48. kash/web_gen/templates/simple_webpage.html.jinja +1 -1
  49. kash/workspaces/selections.py +2 -2
  50. kash/workspaces/workspace_importing.py +1 -1
  51. kash/workspaces/workspace_output.py +2 -2
  52. kash/xonsh_custom/load_into_xonsh.py +4 -2
  53. {kash_shell-0.3.12.dist-info → kash_shell-0.3.13.dist-info}/METADATA +1 -1
  54. {kash_shell-0.3.12.dist-info → kash_shell-0.3.13.dist-info}/RECORD +58 -57
  55. kash/utils/common/inflection.py +0 -22
  56. /kash/{text_handling → utils/text_handling}/markdown_render.py +0 -0
  57. {kash_shell-0.3.12.dist-info → kash_shell-0.3.13.dist-info}/WHEEL +0 -0
  58. {kash_shell-0.3.12.dist-info → kash_shell-0.3.13.dist-info}/entry_points.txt +0 -0
  59. {kash_shell-0.3.12.dist-info → kash_shell-0.3.13.dist-info}/licenses/LICENSE +0 -0
@@ -1,22 +0,0 @@
1
- from functools import cache
2
-
3
- # Had been using the `inflect` package, but it takes over 1s to import.
4
- # pluralizer seems simpler and fine for common English usage.
5
-
6
-
7
- @cache
8
- def _get_pluralizer():
9
- from pluralizer import Pluralizer
10
-
11
- return Pluralizer()
12
-
13
-
14
- def plural(word: str, count: int | None = None) -> str:
15
- """
16
- Pluralize or singularize a word based on the count.
17
- """
18
- from chopdiff.docs import is_word
19
-
20
- if not is_word(word):
21
- return word
22
- return _get_pluralizer().pluralize(word, count=count)