This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.SemanticKernel.Connectors.OpenAI; | |
| using Microsoft.SemanticKernel; | |
| using Microsoft.SemanticKernel.Agents; | |
| using Microsoft.SemanticKernel.ChatCompletion; | |
| using System.Text; | |
| using System.Text.Json.Nodes; | |
| using O365C.Agent.ProjectAssist.Bot.Plugins; | |
| using O365C.Agent.ProjectAssist.Bot.Models; | |
| namespace O365C.Agent.ProjectAssist.Bot.Agents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "AgentApplication": { | |
| "StartTypingTimer": true, | |
| "RemoveRecipientMention": false, | |
| "NormalizeMentions": false, | |
| "UserAuthorization": { | |
| "DefaultHandlerName": "graph", | |
| "AutoSignin": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Agents.Builder; | |
| using Microsoft.Agents.Builder.App; | |
| using Microsoft.Agents.Builder.State; | |
| using Microsoft.Agents.Core.Models; | |
| using Microsoft.Extensions.DependencyInjection.Extensions; | |
| using Microsoft.SemanticKernel; | |
| using Microsoft.SemanticKernel.ChatCompletion; | |
| using O365C.Agent.ProjectAssist.Bot.Agents; | |
| using O365C.Agent.ProjectAssist.Bot.Models; | |
| using O365C.Agent.ProjectAssist.Bot.Services; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.KernelMemory; | |
| using O365C.SK.KernelMemory.FuncApp.Models; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace O365C.SK.KernelMemory.FuncApp.Services | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Azure.WebJobs; | |
| using Microsoft.Azure.WebJobs.Extensions.Http; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.Extensions.Logging; | |
| using Newtonsoft.Json; | |
| using Microsoft.Azure.WebJobs.Extensions.TeamsFx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Target Name="PostBuild" AfterTargets="PreBuildEvent"> | |
| <ZipDir InputBaseDirectory="manifest" OutputFileName="$(OutputPath)\$(MSBuildProjectName).zip" OverwriteExistingFile="true" IncludeBaseDirectory="false" /> | |
| </Target> | |
| <UsingTask TaskName="ZipDir" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | |
| <ParameterGroup> | |
| <InputBaseDirectory ParameterType="System.String" Required="true" /> | |
| <OutputFileName ParameterType="System.String" Required="true" /> | |
| <OverwriteExistingFile ParameterType="System.Boolean" Required="false" /> | |
| <IncludeBaseDirectory ParameterType="System.Boolean" Required="false" /> | |
| </ParameterGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class GraphService : IGraphService | |
| { | |
| private readonly string serviceEndpoint = "https://graph.microsoft.com/v1.0"; | |
| public async Task<UserInfo> GetUserProfileAsync(string accessToken) | |
| { | |
| UserInfo profile = new UserInfo(); | |
| try | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public async Task<string> GetOnBehalfAccessTokenAsync(string graphScopes, string jwtToken) | |
| { | |
| if (jwtToken == null) | |
| { | |
| throw new ArgumentNullException(jwtToken, "tokenValidationContext.SecurityToken should be a JWT Token"); | |
| } | |
| UserAssertion userAssertion = new UserAssertion(jwtToken, "urn:ietf:params:oauth:grant-type:jwt-bearer"); | |
| IEnumerable<string> requestedScopes = graphScopes.Split(new char[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries).ToList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddControllersWithViews(); | |
| services.AddMvc(option => option.EnableEndpointRouting = false); | |
| services.Configure<AzureAdOptions>(Configuration.GetSection("AzureAd")); | |
| services.AddScoped<ITokenAcquisitionService, TokenAcquisitionService>(); | |
| services.AddScoped<IGraphService, GraphService>(); | |
| services.AddMemoryCache(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| import { useState, useContext, useReducer, useEffect } from 'react'; | |
| import ListItemsContext from '../../../../Contexts/ListItemsContext'; | |
| import ItemDetail from './ItemDetail'; | |
| //Material UI | |
| import { makeStyles } from '@material-ui/core/styles'; | |
| import Table from '@material-ui/core/Table'; | |
| import TableBody from '@material-ui/core/TableBody'; | |
| import TableCell from '@material-ui/core/TableCell'; | |
| import TableContainer from '@material-ui/core/TableContainer'; |
NewerOlder