Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a5b6394
build(deps): bump the all-frontend-deps group
dependabot[bot] Nov 1, 2025
f1ae11e
build(deps): bump the all-backend-deps group in /src with 16 updates
dependabot[bot] Nov 1, 2025
1d228d7
build(deps): bump the all-actions group with 4 updates
dependabot[bot] Nov 1, 2025
24be5ae
Refactor and clean up code across multiple files
Kingshuk-Microsoft Dec 29, 2025
ecdcfc0
Fix initialization in _AzureSearchSettings to ensure proper inheritan…
Kingshuk-Microsoft Dec 29, 2025
f57a40c
Refactor _AzureSearchSettings initialization to ensure proper inherit…
Kingshuk-Microsoft Dec 30, 2025
3fb1910
Remove redundant page initialization in BrowsePage, DraftPage, Genera…
Kingshuk-Microsoft Dec 30, 2025
db96c2e
Fix regex pattern in PdfTextSplitter to exclude additional characters…
Kingshuk-Microsoft Dec 30, 2025
83ba039
build(deps): bump the all-frontend-deps group
dependabot[bot] Jan 1, 2026
ff3babd
build(deps): bump the all-backend-deps group in /src with 18 updates
dependabot[bot] Jan 1, 2026
606d3cf
build(deps): bump the all-actions group with 4 updates
dependabot[bot] Jan 1, 2026
8ce46e7
Refactor failedSections handling in appStateReducer for improved clar…
Kingshuk-Microsoft Jan 2, 2026
1422cf4
Add Azure AI agent endpoint and enable build during deployment custom…
Harsh-Microsoft Jan 6, 2026
8cb50dd
Merge branch 'dev' into dependabotchanges
Harsh-Microsoft Jan 7, 2026
af76ea0
chore: downgrade React and related packages to version 18.x, update T…
Harsh-Microsoft Jan 7, 2026
1deb156
Merge pull request #655 from microsoft/dependabotchanges
Roopan-Microsoft Jan 9, 2026
78a8480
Add sample environment configuration for Azure AI integration
Kingshuk-Microsoft Jan 9, 2026
0d94aaa
Merge pull request #647 from microsoft/security-code-quality-fix
Roopan-Microsoft Jan 12, 2026
3ff3a9b
chore: update dependencies in package.json
Harsh-Microsoft Jan 12, 2026
bfe2a2f
chore: replace npm ci with npm install in GitHub Actions workflow
Harsh-Microsoft Jan 12, 2026
5f5439d
rebuilt package lock
Harsh-Microsoft Jan 12, 2026
b0036a7
Merge branch 'dev' into hb-psl-fix-testissue
Harsh-Microsoft Jan 12, 2026
ffb5d13
fix: ensure QUOTA_FAILED output defaults to 'false' in job-deploy.yml
Harsh-Microsoft Jan 12, 2026
660d626
fix: remove 'hb-psl-fix-testissue' branch from push triggers in node.…
Harsh-Microsoft Jan 12, 2026
0126ce8
Merge pull request #662 from microsoft/hb-psl-fix-testissue
Roopan-Microsoft Jan 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install GitHub CLI
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
steps:
# Step 1: Checkout the code from your repository
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

# Step 2: Validate the Azure template using microsoft/template-validation-action
- name: Validate Azure Template
uses: microsoft/template-validation-action@v0.4.3
uses: microsoft/template-validation-action@v0.4.4
id: validation
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/broken-links-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

# For PR : Get only changed markdown files
- name: Get changed markdown files (PR only)
id: changed-markdown-files
if: github.event_name == 'pull_request'
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v46
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v46
with:
files: |
**/*.md
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Check Broken Links in Changed Markdown Files
id: lychee-check-pr
if: github.event_name == 'pull_request' && steps.changed-markdown-files.outputs.any_changed == 'true'
uses: lycheeverse/lychee-action@v2.6.1
uses: lycheeverse/lychee-action@v2.7.0
with:
args: >
--verbose --no-progress --exclude ^https?://
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Check Broken Links in All Markdown Files in Entire Repo (Manual Trigger)
id: lychee-check-manual
if: github.event_name == 'workflow_dispatch'
uses: lycheeverse/lychee-action@v2.6.1
uses: lycheeverse/lychee-action@v2.7.0
with:
args: >
--verbose --no-progress --exclude ^https?://
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
WEBAPP_URL: ${{ steps.get_output.outputs.WEBAPP_URL }}
steps:
- name: Checkout Code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup Azure CLI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ on:
value: ${{ jobs.azure-setup.outputs.IMAGE_TAG }}
QUOTA_FAILED:
description: "Quota Check Failed Flag"
value: ${{ jobs.azure-setup.outputs.QUOTA_FAILED }}
value: ${{ jobs.azure-setup.outputs.QUOTA_FAILED || 'false' }}

env:
GPT_MIN_CAPACITY: 150
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Build Frontend

on:
push:
branches: [ "main" ]
branches: [ "main", "dev" ]
paths:
- 'src/frontend/**/*.ts'
- 'src/frontend/**/*.tsx'
Expand All @@ -17,7 +17,7 @@ on:
- 'src/frontend/**/*.html'
- '.github/workflows/node.js.yml'
pull_request:
branches: [ "main" ]
branches: [ "main", "dev" ]
paths:
- 'src/frontend/**/*.ts'
- 'src/frontend/**/*.tsx'
Expand All @@ -37,18 +37,17 @@ jobs:
working-directory: src/frontend
strategy:
matrix:
node-version: [18.x, 21.x]
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'src/frontend/package-lock.json'
- run: npm ci
- run: npm install --save-dev jest-environment-jsdom # Install missing package
- run: NODE_OPTIONS=--max_old_space_size=8192 npm run build --if-present
- run: npm run test --if-present
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
# Step 1: Checkout code
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

# Step 2: Set up Python environment
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on:
- windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history for accurate branch checks
- name: Fetch All Branches
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload CSV Report of Inactive Branches
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: merged-branches-report
path: merged_branches_report.csv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/telemetry-template-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Check for required metadata template line
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
TEST_REPORT_URL: ${{ steps.upload_report.outputs.artifact-url }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Upload test report
id: upload_report
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: test-report
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main # Trigger on push to the main branch
- dev
paths:
- 'src/**/*.py'
- 'src/requirements*.txt'
Expand All @@ -16,6 +17,7 @@ on:
pull_request:
branches:
- main # Trigger on pull requests to the main branch
- dev
types:
- opened
- ready_for_review
Expand All @@ -37,7 +39,7 @@ jobs:
runs-on: ubuntu-latest # Use the latest Ubuntu runner

steps:
- uses: actions/checkout@v5 # Checkout the repository
- uses: actions/checkout@v6 # Checkout the repository

# Set up Python environment for Backend
- name: Set up Python
Expand Down Expand Up @@ -67,7 +69,7 @@ jobs:
echo "No tests found, skipping coverage check."
fi

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: backend-coverage
path: |
Expand All @@ -80,16 +82,16 @@ jobs:
runs-on: ubuntu-latest # Use the latest Ubuntu runner

steps:
- uses: actions/checkout@v5 # Checkout the repository
- uses: actions/checkout@v6 # Checkout the repository

# Set up Node.js environment for Frontend
- name: Set up Node.js
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: '20' # Set the Node.js version

- name: Cache npm dependencies
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -121,7 +123,7 @@ jobs:
echo "No tests found, skipping coverage check."
fi

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: frontend-coverage
path: |
Expand Down
7 changes: 6 additions & 1 deletion infra/main_custom.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,10 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
{name: 'AZURE-OPENAI-PREVIEW-API-VERSION', value: azureOpenaiAPIVersion}
{name: 'AZURE-OPEN-AI-DEPLOYMENT-MODEL', value: gptModelName}
{name: 'TENANT-ID', value: subscription().tenantId}
{
name: 'AZURE-AI-AGENT-ENDPOINT'
value: aiFoundryAiProjectEndpoint
}
]
}
dependsOn:[
Expand Down Expand Up @@ -1160,7 +1164,8 @@ module webSite 'modules/web-sites.bicep' = {
{
name: 'appsettings'
properties: {
SCM_DO_BUILD_DURING_DEPLOYMENT: 'false'
SCM_DO_BUILD_DURING_DEPLOYMENT: 'True'
ENABLE_ORYX_BUILD: 'True'
AUTH_ENABLED: 'false'
AZURE_SEARCH_SERVICE: aiSearch.outputs.name
AZURE_SEARCH_INDEX: azureSearchIndex
Expand Down
2 changes: 1 addition & 1 deletion infra/scripts/index_scripts/02_process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ def prepare_search_doc(content, document_id):
docs = []

if docs != []:
results = search_client.upload_documents(documents=docs)
search_client.upload_documents(documents=docs)

print(f'{str(counter)} files processed.')
15 changes: 12 additions & 3 deletions scripts/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ def extract_caption(self, text):

def mask_urls_and_imgs(self, text) -> Tuple[Dict[str, str], str]:
def find_urls(string):
regex = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^()\s<>]+|\(([^()\s<>]+|(\([^()\s<>]+\)))*\))+(?:\(([^()\s<>]+|(\([^()\s<>]+\)))*\)|[^()\s`!()\[\]{};:'\".,<>?«»“”‘’]))"
regex = (
r"(?i)\b("
r"(?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)"
r"(?:[^()\s<>]+|\(([^()\s<>]+|(\([^()\s<>]+\)))*\))+"
r"(?:\(([^()\s<>]+|(\([^()\s<>]+\)))*\)|[^()\s`!()\[\]{};:'\".,<>?«»“”‘’])"
r")"
)
urls = re.findall(regex, string)
return [x[0] for x in urls]

Expand Down Expand Up @@ -693,7 +699,9 @@ def extract_pdf_content(file_path, form_recognizer_client, use_layout=False):
page_map = []
model = "prebuilt-layout" if use_layout else "prebuilt-read"

base64file = base64.b64encode(open(file_path, "rb").read()).decode()
with open(file_path, "rb") as f:
file_bytes = f.read()
base64file = base64.b64encode(file_bytes).decode()
poller = form_recognizer_client.begin_analyze_document(
model, AnalyzeDocumentRequest(bytes_source=base64file)
)
Expand Down Expand Up @@ -1048,7 +1056,8 @@ def image_content_to_tag(image_content: str) -> str:


def get_caption(image_path, captioning_model_endpoint, captioning_model_key):
encoded_image = base64.b64encode(open(image_path, "rb").read()).decode("ascii")
with open(image_path, "rb") as image_file:
encoded_image = base64.b64encode(image_file.read()).decode("ascii")
file_ext = image_path.split(".")[-1]
headers = {
"Content-Type": "application/json",
Expand Down
2 changes: 0 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ async def init_ai_foundry_client():
return ai_foundry_client
except Exception as e:
logging.exception("Exception in AI Foundry initialization", e)
ai_foundry_client = None
raise e


Expand Down Expand Up @@ -197,7 +196,6 @@ def init_cosmosdb_client():
if span is not None:
span.record_exception(e)
span.set_status(Status(StatusCode.ERROR, str(e)))
cosmos_conversation_client = None
raise e
else:
logging.debug("CosmosDB not configured")
Expand Down
2 changes: 1 addition & 1 deletion src/backend/history/cosmosdbservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async def delete_messages(self, conversation_id, user_id):
item=message["id"], partition_key=user_id
)
response_list.append(resp)
return response_list
return response_list

async def get_conversations(self, user_id, limit, sort_order="DESC", offset=0):
parameters = [{"name": "@userId", "value": user_id}]
Expand Down
10 changes: 8 additions & 2 deletions src/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@ def split_contexts(
class DatasourcePayloadConstructor(BaseModel, ABC):
_settings: "_AppSettings" = PrivateAttr()

def __init__(self, settings: "_AppSettings", **data):
super().__init__(**data)
def __init__(self, *args, settings: "_AppSettings", **data):
# Call next __init__ in MRO to allow cooperative multiple inheritance
super().__init__(*args, **data)
self._settings = settings

@abstractmethod
Expand Down Expand Up @@ -302,6 +303,10 @@ class _AzureSearchSettings(BaseSettings, DatasourcePayloadConstructor):
fields_mapping: Optional[dict] = None
filter: Optional[str] = Field(default=None, exclude=True)

def __init__(self, settings: "_AppSettings", **data):
# Ensure both BaseSettings and DatasourcePayloadConstructor are initialized
super().__init__(settings=settings, **data)

@field_validator("content_columns", "vector_columns", mode="before")
@classmethod
def split_columns(cls, comma_separated_string: str) -> List[str]:
Expand Down Expand Up @@ -439,6 +444,7 @@ def set_datasource_settings(self) -> Self:
logging.warning(
"No datasource configuration found in the environment -- calls will be made to Azure OpenAI without grounding data."
)
return self


app_settings = _AppSettings()
Loading
Loading