portacode 0.3.19.dev7__tar.gz → 0.3.19.dev8__tar.gz

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 (45) hide show
  1. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/PKG-INFO +1 -1
  2. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/_version.py +2 -2
  3. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/project_state_handlers.py +39 -33
  4. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/PKG-INFO +1 -1
  5. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/.claude/agents/communication-manager.md +0 -0
  6. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/.claude/settings.local.json +0 -0
  7. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/.gitignore +0 -0
  8. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/.gitmodules +0 -0
  9. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/LICENSE +0 -0
  10. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/MANIFEST.in +0 -0
  11. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/Makefile +0 -0
  12. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/README.md +0 -0
  13. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/backup.sh +0 -0
  14. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/docker-compose.yaml +0 -0
  15. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/README.md +0 -0
  16. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/__init__.py +0 -0
  17. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/__main__.py +0 -0
  18. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/cli.py +0 -0
  19. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/README.md +0 -0
  20. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/__init__.py +0 -0
  21. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/client.py +0 -0
  22. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/README.md +0 -0
  23. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/WEBSOCKET_PROTOCOL.md +0 -0
  24. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/__init__.py +0 -0
  25. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/base.py +0 -0
  26. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/file_handlers.py +0 -0
  27. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/registry.py +0 -0
  28. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/session.py +0 -0
  29. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/system_handlers.py +0 -0
  30. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/tab_factory.py +0 -0
  31. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/handlers/terminal_handlers.py +0 -0
  32. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/multiplex.py +0 -0
  33. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/connection/terminal.py +0 -0
  34. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/data.py +0 -0
  35. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/keypair.py +0 -0
  36. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode/service.py +0 -0
  37. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/SOURCES.txt +0 -0
  38. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/dependency_links.txt +0 -0
  39. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/entry_points.txt +0 -0
  40. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/requires.txt +0 -0
  41. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/portacode.egg-info/top_level.txt +0 -0
  42. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/pyproject.toml +0 -0
  43. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/restore.sh +0 -0
  44. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/setup.cfg +0 -0
  45. {portacode-0.3.19.dev7 → portacode-0.3.19.dev8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: portacode
3
- Version: 0.3.19.dev7
3
+ Version: 0.3.19.dev8
4
4
  Summary: Portacode CLI client and SDK
5
5
  Home-page: https://github.com/portacode/portacode
6
6
  Author: Meena Erian
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.3.19.dev7'
21
- __version_tuple__ = version_tuple = (0, 3, 19, 'dev7')
20
+ __version__ = version = '0.3.19.dev8'
21
+ __version_tuple__ = version_tuple = (0, 3, 19, 'dev8')
@@ -344,7 +344,8 @@ class GitManager:
344
344
 
345
345
  try:
346
346
  # Use Pygments' built-in filename detection
347
- return get_lexer_for_filename(file_path)
347
+ lexer = get_lexer_for_filename(file_path)
348
+ return lexer
348
349
  except ClassNotFound:
349
350
  # If no lexer found, return None (will fall back to plain text)
350
351
  logger.debug("No Pygments lexer found for file: %s", file_path)
@@ -445,42 +446,39 @@ class GitManager:
445
446
  content = line_info['content']
446
447
  intraline_html = line_info.get('intraline_html', '')
447
448
 
448
- # Use intra-line highlighted content if available
449
- if intraline_html:
450
- final_content = intraline_html
451
- else:
452
- # Apply syntax highlighting to the content
453
- if content and content[0] in '+-':
454
- # For added/deleted lines, highlight the content without the prefix
455
- prefix = content[0]
456
- clean_content = content[1:]
457
-
458
- if lexer and clean_content.strip():
459
- try:
460
- # Apply syntax highlighting
461
- highlighted = highlight(clean_content, lexer, HtmlFormatter(nowrap=True, noclasses=False))
462
- final_content = prefix + highlighted
463
- except Exception as e:
464
- logger.debug("Error applying syntax highlighting: %s", e)
465
- final_content = self._escape_html(content)
466
- else:
449
+ # Apply syntax highlighting to the content (prioritize syntax highlighting over intraline for now)
450
+ if content and content[0] in '+-':
451
+ # For added/deleted lines, highlight the content without the prefix
452
+ prefix = content[0]
453
+ clean_content = content[1:]
454
+
455
+ if lexer and clean_content.strip():
456
+ try:
457
+ # Apply syntax highlighting
458
+ highlighted = highlight(clean_content, lexer, HtmlFormatter(nowrap=True, noclasses=False))
459
+ final_content = prefix + highlighted
460
+ except Exception as e:
461
+ logger.debug("Error applying syntax highlighting: %s", e)
467
462
  final_content = self._escape_html(content)
468
- elif content and content[0] == ' ':
469
- # For context lines, highlight without the space prefix
470
- clean_content = content[1:]
471
-
472
- if lexer and clean_content.strip():
473
- try:
474
- # Apply syntax highlighting
475
- highlighted = highlight(clean_content, lexer, HtmlFormatter(nowrap=True, noclasses=False))
476
- final_content = ' ' + highlighted
477
- except Exception as e:
478
- logger.debug("Error applying syntax highlighting: %s", e)
479
- final_content = self._escape_html(content)
480
- else:
463
+ else:
464
+ final_content = self._escape_html(content)
465
+
466
+ elif content and content[0] == ' ':
467
+ # For context lines, highlight without the space prefix
468
+ clean_content = content[1:]
469
+
470
+ if lexer and clean_content.strip():
471
+ try:
472
+ # Apply syntax highlighting
473
+ highlighted = highlight(clean_content, lexer, HtmlFormatter(nowrap=True, noclasses=False))
474
+ final_content = ' ' + highlighted
475
+ except Exception as e:
476
+ logger.debug("Error applying syntax highlighting: %s", e)
481
477
  final_content = self._escape_html(content)
482
478
  else:
483
479
  final_content = self._escape_html(content)
480
+ else:
481
+ final_content = self._escape_html(content)
484
482
 
485
483
  # CSS classes for different line types
486
484
  row_class = f'diff-line diff-{line_type}'
@@ -550,6 +548,14 @@ class GitManager:
550
548
  old_line_num = int(match.group(1)) - 1
551
549
  new_line_num = int(match.group(2)) - 1
552
550
 
551
+ parsed.append({
552
+ 'type': 'header',
553
+ 'content': line,
554
+ 'old_line_num': '',
555
+ 'new_line_num': ''
556
+ })
557
+ elif line.startswith('---') or line.startswith('+++'):
558
+ # Skip diff file headers (--- a/file, +++ b/file)
553
559
  parsed.append({
554
560
  'type': 'header',
555
561
  'content': line,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: portacode
3
- Version: 0.3.19.dev7
3
+ Version: 0.3.19.dev8
4
4
  Summary: Portacode CLI client and SDK
5
5
  Home-page: https://github.com/portacode/portacode
6
6
  Author: Meena Erian
File without changes