body -> field
This commit is contained in:
@@ -24,24 +24,17 @@ from gdocs.docs_helpers import (
|
|||||||
create_insert_table_request,
|
create_insert_table_request,
|
||||||
create_insert_page_break_request,
|
create_insert_page_break_request,
|
||||||
create_insert_image_request,
|
create_insert_image_request,
|
||||||
create_bullet_list_request,
|
create_bullet_list_request
|
||||||
validate_operation
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Import document structure and table utilities
|
# Import document structure and table utilities
|
||||||
from gdocs.docs_structure import (
|
from gdocs.docs_structure import (
|
||||||
parse_document_structure,
|
parse_document_structure,
|
||||||
find_tables,
|
find_tables,
|
||||||
get_table_cell_indices,
|
|
||||||
find_element_at_index,
|
|
||||||
analyze_document_complexity
|
analyze_document_complexity
|
||||||
)
|
)
|
||||||
from gdocs.docs_tables import (
|
from gdocs.docs_tables import (
|
||||||
build_table_population_requests,
|
extract_table_as_data
|
||||||
format_table_data,
|
|
||||||
validate_table_data,
|
|
||||||
extract_table_as_data,
|
|
||||||
find_table_by_content
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Import operation managers for complex business logic
|
# Import operation managers for complex business logic
|
||||||
@@ -524,7 +517,7 @@ async def insert_doc_elements(
|
|||||||
# Handle the special case where we can't insert at the first section break
|
# Handle the special case where we can't insert at the first section break
|
||||||
# If index is 0, bump it to 1 to avoid the section break
|
# If index is 0, bump it to 1 to avoid the section break
|
||||||
if index == 0:
|
if index == 0:
|
||||||
logger.debug(f"Adjusting index from 0 to 1 to avoid first section break")
|
logger.debug("Adjusting index from 0 to 1 to avoid first section break")
|
||||||
index = 1
|
index = 1
|
||||||
|
|
||||||
requests = []
|
requests = []
|
||||||
@@ -602,7 +595,7 @@ async def insert_doc_image(
|
|||||||
# Handle the special case where we can't insert at the first section break
|
# Handle the special case where we can't insert at the first section break
|
||||||
# If index is 0, bump it to 1 to avoid the section break
|
# If index is 0, bump it to 1 to avoid the section break
|
||||||
if index == 0:
|
if index == 0:
|
||||||
logger.debug(f"Adjusting index from 0 to 1 to avoid first section break")
|
logger.debug("Adjusting index from 0 to 1 to avoid first section break")
|
||||||
index = 1
|
index = 1
|
||||||
|
|
||||||
# Determine if source is a Drive file ID or URL
|
# Determine if source is a Drive file ID or URL
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ multiple Google Docs API calls for complex table manipulations.
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
from typing import List, Dict, Any, Optional, Tuple
|
from typing import List, Dict, Any, Tuple
|
||||||
|
|
||||||
from gdocs.docs_helpers import create_insert_table_request
|
from gdocs.docs_helpers import create_insert_table_request
|
||||||
from gdocs.docs_structure import find_tables
|
from gdocs.docs_structure import find_tables
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ This module provides centralized validation logic for Google Docs operations,
|
|||||||
extracting validation patterns from individual tool functions.
|
extracting validation patterns from individual tool functions.
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, Any, List, Tuple, Optional, Union
|
from typing import Dict, Any, List, Tuple, Optional
|
||||||
import re
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user